small bugfixes #18

Merged
HorizonCode merged 3 commits from dev into master 2024-04-23 07:57:29 +00:00
Showing only changes of commit cd8f42327c - Show all commits

View File

@ -274,7 +274,6 @@ async function downloadEZPPLauncherUpdateFiles(osuPath, updateFiles, allFiles) {
//NOTE: delete files that are not in the updateFiles array
const foldersToPrune = allFiles.map(file => path.dirname(path.join(osuPath, ...file.folder.split("/"), file.name))).filter((folder, index, self) => self.indexOf(folder) === index);
for (const pruneFolder of foldersToPrune) {
console.log("Pruning folder:", pruneFolder);
//NOTE: check if the folder is not the osu root folder.
if (path.basename(pruneFolder) == "osu!")
continue;
@ -284,8 +283,6 @@ async function downloadEZPPLauncherUpdateFiles(osuPath, updateFiles, allFiles) {
const validFolder = allFiles.find(file => path.dirname(filePath).endsWith(file.folder));
if (!validFolder) {
if (allFiles.find(file => file.name == path.basename(filePath)) === undefined) {
console.log("Deleting file:", filePath);
console.log(allFiles.find(file => file.name == path.basename(filePath)));
eventEmitter.emit("data", {
fileName: path.basename(filePath),
});