Merge branch 'v1.5.0' into feature/playlists/107

This commit is contained in:
MathieuG-P
2024-02-26 15:33:13 +01:00
23 changed files with 398 additions and 23 deletions
+1 -2
View File
@@ -32,7 +32,6 @@ ipc.on<LaunchOption>("create-launch-shortcut", (req, reply) => {
reply(from(bsLauncher.createLaunchShortcut(req.args)));
});
ipc.on<void>("bs-launch.restore-steamvr", (_, reply) => {
const steamLauncher = SteamLauncherService.getInstance();
reply(from(steamLauncher.restoreSteamVR()));
@@ -43,4 +42,4 @@ ipc.on<void>("restore-original-oculus-folder", (_, reply) => {
reply(from(
oculusLauncher.deleteBsSymlinks().then(() => oculusLauncher.restoreOriginalBeatSaber())
));
})
});
@@ -11,6 +11,7 @@ import { AbstractLauncherService } from "./abstract-launcher.service";
import { taskRunning } from "../../helpers/os.helpers";
import { CustomError } from "../../../shared/models/exceptions/custom-error.class";
import { InstallationLocationService } from "../installation-location.service";
import { ensurePathNotAlreadyExist } from "../../helpers/fs.helpers";
export class OculusLauncherService extends AbstractLauncherService implements StoreLauncherInterface {
@@ -86,7 +87,7 @@ export class OculusLauncherService extends AbstractLauncherService implements St
private async backupOriginalBeatSaber(): Promise<void>{
const bsFolder = await this.oculus.getGameFolder(OCULUS_BS_DIR);
if(!bsFolder){ return; }
const backupPath = path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR);
const backupPath = await ensurePathNotAlreadyExist(path.join(bsFolder, "..", OCULUS_BS_BACKUP_DIR));
log.info("Backing up original Beat Saber", bsFolder, backupPath);
return rename(bsFolder, backupPath);
}