[hotfix] When link folder, if folder not exist, not create empty backup

This commit is contained in:
MathieuG-P
2023-03-20 00:46:40 +01:00
parent 2e588ef4cb
commit e1a6721f7d
+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){