diff --git a/src/main/services/folder-linker.service.ts b/src/main/services/folder-linker.service.ts index 81a3884d..0fee81b5 100644 --- a/src/main/services/folder-linker.service.ts +++ b/src/main/services/folder-linker.service.ts @@ -52,13 +52,14 @@ export class FolderLinkerService { const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder); - await ensureFolderExist(folderPath); await ensureFolderExist(sharedPath); if(options?.backup === true){ await this.backupFolder(folderPath); } + await ensureFolderExist(folderPath); + if(options?.keepContents !== false){ await moveFolderContent(folderPath, sharedPath).toPromise(); } @@ -75,6 +76,8 @@ export class FolderLinkerService { const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder); + lstat(sharedPath).then(console.log); + await ensureFolderExist(folderPath); if(options?.backup === true){