Skip to content

Commit

Permalink
fixed the previous change that only worked when a file was updated an…
Browse files Browse the repository at this point in the history
…d not deleted
  • Loading branch information
Kensaa committed Sep 17, 2024
1 parent 2f68a4c commit 11bad3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion launcher/electron/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,16 @@ async function launchGameRemote(args: StartArgs) {
.filter(key => typeof localFolder[key] === 'string')
.filter(key => !Object.keys(remoteFolder).includes(key))
for (const file of onlyLocalFile) {
fs.rmSync(path.join(folderPath, ...pathA, file), {
if (
pathA[0] !== undefined &&
FOLDER_HASH_UPDATE_SKIP.includes(pathA[0])
) {
// Used to skip certain forlders (like config) from being deleted because we don't really care about them being up to date
continue
}
const filepath = path.join(folderPath, ...pathA, file)
logger.info('Deleting file "%s"', filepath)
fs.rmSync(filepath, {
recursive: true
})
}
Expand Down
2 changes: 1 addition & 1 deletion launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A Minecraft launcher with auto-update feature to facilitate playing modded minecraft",
"author": "Kensa",
"private": true,
"version": "3.3.2",
"version": "3.3.3",
"license": "MIT",
"main": "dist-electron/electron.js",
"scripts": {
Expand Down

0 comments on commit 11bad3b

Please sign in to comment.