Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit b3c2003

Browse files
authored
Merge pull request #17 from DeathsGun/bugs/15_windows_delete_error
2 parents 8b94164 + e804339 commit b3c2003

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/xyz/deathsgun/modmanager/tasks/ModRemovalTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import xyz.deathsgun.modmanager.api.mod.SummarizedMod;
2727
import xyz.deathsgun.modmanager.util.FabricMods;
2828

29-
import java.nio.file.Files;
3029
import java.nio.file.Path;
3130
import java.util.Optional;
3231

@@ -53,7 +52,8 @@ protected void execute() throws Exception {
5352
if (jar == null) {
5453
throw new Exception(String.format("Couldn't find jar for %s", subject.name()));
5554
}
56-
Files.delete(jar);
55+
//TODO: Delete file directly
56+
jar.toFile().deleteOnExit();
5757
ModManager.getModManipulationManager().removeManuallyInstalled(subject);
5858
}
5959

src/main/java/xyz/deathsgun/modmanager/tasks/ModUpdateTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import xyz.deathsgun.modmanager.util.FabricMods;
1010
import xyz.deathsgun.modmanager.util.InstallationUtil;
1111

12-
import java.nio.file.Files;
1312
import java.nio.file.Path;
1413
import java.util.Optional;
1514

@@ -40,7 +39,8 @@ protected void execute() throws Exception {
4039
if (jar == null) {
4140
throw new Exception(String.format("Couldn't find jar for %s", subject.name()));
4241
}
43-
Files.delete(jar);
42+
//TODO: Delete file directly
43+
jar.toFile().deleteOnExit();
4444
InstallationUtil.downloadMod(http, InstallationUtil.getVersionForMod(subject));
4545
ModManager.getModManipulationManager().markManuallyUpdated(subject);
4646
ModManager.getUpdateChecker().removeUpdate(subject.id());

0 commit comments

Comments
 (0)