diff --git a/packages/basic.gblib/services/SystemKeywords.ts b/packages/basic.gblib/services/SystemKeywords.ts index 7cf10034..d447c1a2 100644 --- a/packages/basic.gblib/services/SystemKeywords.ts +++ b/packages/basic.gblib/services/SystemKeywords.ts @@ -530,9 +530,18 @@ export class SystemKeywords { // Checks if the destination contains subfolders that // need to be created. + // Checks if the destination contains subfolders that + // need to be created. + + let folder; if (dest.indexOf('/') !== -1) { const pathOnly = path.dirname(dest); - await this.createFolder(pathOnly); + folder = await this.createFolder(pathOnly); + } + else { + folder = await client.api( + `${baseUrl}/drive/root:/${root}`) + .get(); } // Performs the conversion operation getting a reference