Commit a7496150 authored by SpinShare's avatar SpinShare

Ignore backups and SRTB Editor in library cleanup

parent 683a90ea
...@@ -240,12 +240,21 @@ ...@@ -240,12 +240,21 @@
// Waits for resolve in order to avoid bug where all songs would be added to differingAssets // Waits for resolve in order to avoid bug where all songs would be added to differingAssets
let allLinkedAssetsResults = await allLinkedAssetsPromise; let allLinkedAssetsResults = await allLinkedAssetsPromise;
let whitelistedFiles = [
"Settings.txt", // Programmatic's SRTB Editor
"SRTB_Editor.exe", // Programmatic's SRTB Editor
"SRTB_Editor.pdb" // Programmatic's SRTB Editor
]
// Creates differingAssets by seeing if each entry in the assets folder is included in the allLinkedAssets. // Creates differingAssets by seeing if each entry in the assets folder is included in the allLinkedAssets.
let allFiles = glob.sync(path.join(userSettings.get('gameDirectory'), "*")); let allFiles = glob.sync(path.join(userSettings.get('gameDirectory'), "*"));
allFiles.forEach((file) => { allFiles.forEach((file) => {
if (!allLinkedAssetsResults.includes(file) && fs.statSync(file).isFile()) { if (!allLinkedAssetsResults.includes(file) && fs.statSync(file).isFile()) {
// Exclude whitelisted files & .zip files
if(!whitelistedFiles.includes(path.basename(file)) && !path.basename(file).includes(".zip")) {
differingAssets.push(file); differingAssets.push(file);
} }
}
}); });
let thisData = this.$data; let thisData = this.$data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment