chore: check for missing files on start
This commit is contained in:
@@ -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 });
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user