Merge pull request #190 from Zagrios/hotfix/fix-create-empty-backup-if-target-folder-not-exist-when-linking

[hotfix] When link folder, if folder not exist, not create empty backup
This commit is contained in:
MathieuG-P
2023-03-20 00:47:31 +01:00
committed by GitHub
+4 -1
View File
@@ -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){