chore: check for missing files on start

This commit is contained in:
2025-07-07 18:28:18 +02:00
parent 2082beb387
commit 1ab19957ba
4 changed files with 43 additions and 8 deletions

View File

@@ -114,3 +114,5 @@ export const isOsuRunning = async () => {
export const getLauncherVersion = async () => await invoke<string>('get_launcher_version');
export const exit = async () => await invoke('exit');
export const getPlatform = async () => await invoke<string>('get_platform');
export const isOsuCorrupted = async (folder: string) =>
await invoke<boolean>('check_for_corruption', { folder });

View File

@@ -84,6 +84,7 @@
getSkin,
getSkinsCount,
getVersion,
isOsuCorrupted,
isOsuRunning,
isValidOsuFolder,
replaceUIFiles,
@@ -221,7 +222,9 @@
}
const releaseStream = await getReleaseStream(osuPath);
let forceUpdate = releaseStream && releaseStream.toLowerCase() !== 'stable40';
const osuCorrupted = await isOsuCorrupted(osuPath);
let forceUpdate =
(releaseStream && releaseStream.toLowerCase() !== 'stable40') || osuCorrupted;
const versions = compareBuildNumbers($osuBuild, streamInfo);
if (versions > 0 || forceUpdate) {