mirror of
https://github.com/shadps4-emu/shadPS4-launcher.git
synced 2026-01-31 00:55:20 +01:00
fix: Game list not being updated
* fix game list not being updated, when games are removed when the launcher is closed. * add vs files to the gitignore file.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -23,5 +23,6 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
.vs
|
||||
|
||||
.env
|
||||
@@ -148,9 +148,12 @@ async function scanDirectory(
|
||||
return;
|
||||
}
|
||||
const children = await readDir(path);
|
||||
let tempKnownPaths = new Set<string>(knownPaths);
|
||||
|
||||
for (const c of children) {
|
||||
if (c.isDirectory) {
|
||||
const childPath = await join(path, c.name);
|
||||
tempKnownPaths.delete(childPath);
|
||||
await scanDirectory(
|
||||
childPath,
|
||||
knownPaths,
|
||||
@@ -159,6 +162,13 @@ async function scanDirectory(
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
tempKnownPaths.forEach((path) => {
|
||||
unregisterGamePathPrefix(
|
||||
path,
|
||||
knownPaths,
|
||||
);
|
||||
});
|
||||
} catch (e: unknown) {
|
||||
console.error(`Error discovering game at "${path}"`, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user