no other operation when an operation is running

This commit is contained in:
MathieuG-P
2022-07-31 18:12:24 +02:00
parent d880416d6c
commit 5d848859e5
9 changed files with 51 additions and 7 deletions
+1 -2
View File
@@ -139,8 +139,7 @@ export class BSInstallerService{
reject(err);
});
this.downloadProcess.on('close', (code) => reject({type: "[Exit]", data: code}));
this.downloadProcess.on('close', () => reject());
})
}
@@ -43,7 +43,7 @@ export class InstallationLocationService {
const oldDir = this.installationDirectory;
const newDest = path.join(newDir, this.INSTALLATION_FOLDER);
return new Promise<string>((resolve, reject) => {
if(!this.utilsService.folderExist(oldDir)){ this.utilsService.createFolderIfNotExist(oldDir); }
if(!this.utilsService.pathExist(oldDir)){ this.utilsService.createFolderIfNotExist(oldDir); }
fs.move(oldDir, newDest, { overwrite: true }).then(() => {
this._installationDirectory = newDir;
this.configService.store.set(this.STORE_INSTALLATION_PATH_KEY, newDir);