mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[bugfix-560] don't move old installation path if it doesn't exist
This commit is contained in:
@@ -204,7 +204,7 @@ export function SettingsPage() {
|
||||
|
||||
notificationService.notifySuccess({ title: "notifications.settings.move-folder.success.titles.transfer-started", desc: "notifications.settings.move-folder.success.descs.transfer-started" });
|
||||
|
||||
lastValueFrom(installationLocationService.setInstallationFolder(fileChooserRes.filePaths[0])).then(res => {
|
||||
lastValueFrom(installationLocationService.setInstallationFolder(fileChooserRes.filePaths[0], true)).then(res => {
|
||||
|
||||
progressBarService.complete();
|
||||
progressBarService.hide(true);
|
||||
|
||||
@@ -23,7 +23,13 @@ export class InstallationLocationService {
|
||||
return lastValueFrom(this.ipcService.sendV2("bs-installer.install-path"));
|
||||
}
|
||||
|
||||
public setInstallationFolder(path: string): Observable<string> {
|
||||
return this.ipcService.sendV2("bs-installer.set-install-path", path);
|
||||
/**
|
||||
* @param move - if true, move the old installation path to the path param
|
||||
*/
|
||||
public setInstallationFolder(path: string, move: boolean): Observable<string> {
|
||||
return this.ipcService.sendV2(
|
||||
"bs-installer.set-install-path",
|
||||
{ path, move }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class SetupService {
|
||||
{ closable: false }
|
||||
);
|
||||
|
||||
await lastValueFrom(this.installationLocationService.setInstallationFolder(modalResponse.data.installPath));
|
||||
await lastValueFrom(this.installationLocationService.setInstallationFolder(modalResponse.data.installPath, false));
|
||||
|
||||
// Refresh the versions tab
|
||||
await this.versionManagerService.askInstalledVersions();
|
||||
|
||||
Reference in New Issue
Block a user