This repository was archived by the owner on Dec 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/xyz/deathsgun/modmanager/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import xyz .deathsgun .modmanager .api .mod .SummarizedMod ;
2727import xyz .deathsgun .modmanager .util .FabricMods ;
2828
29- import java .nio .file .Files ;
3029import java .nio .file .Path ;
3130import 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
Original file line number Diff line number Diff line change 99import xyz .deathsgun .modmanager .util .FabricMods ;
1010import xyz .deathsgun .modmanager .util .InstallationUtil ;
1111
12- import java .nio .file .Files ;
1312import java .nio .file .Path ;
1413import 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 ());
You can’t perform that action at this time.
0 commit comments