From 61145d5e80ee774a404ec768c66035a610aaa1e3 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 18 Oct 2019 18:37:43 +0200 Subject: [PATCH] fix(core): update --- ts/smartbucket.classes.directory.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ts/smartbucket.classes.directory.ts b/ts/smartbucket.classes.directory.ts index 906cf2b..ab1ad09 100644 --- a/ts/smartbucket.classes.directory.ts +++ b/ts/smartbucket.classes.directory.ts @@ -123,9 +123,11 @@ export class Directory { /** * gets a sub directory */ - public async getSubDirectory(): Promise { - return this; - // TODO + public async getSubDirectoryByName(dirNameArg: string): Promise { + const directories = await this.listDirectories(); + return directories.find(directory => { + return directory.name === dirNameArg; + }); } /**