Skip to content

Commit 38d9461

Browse files
committed
another fix
1 parent 3f938ec commit 38d9461

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/java/com/benjamin538/modPackage/InstallPackage.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// path
44
import java.nio.file.Paths;
5+
import java.nio.file.StandardCopyOption;
56
import java.nio.file.Path;
67
import java.nio.file.Files;
78

@@ -65,10 +66,7 @@ public static void installPackage(Path path) {
6566
logger.warn("(Did you installed Geode?");
6667
Files.createDirectories(modDir);
6768
}
68-
if (Files.exists(path)) {
69-
Files.delete(path);
70-
}
71-
Files.copy(path, Paths.get(gdPath, "geode", "mods", path.getFileName().toString()));
69+
Files.move(path, Paths.get(gdPath, "geode", "mods", path.getFileName().toString()), StandardCopyOption.REPLACE_EXISTING);
7270
logger.done("Installed " + path.getFileName().toString());
7371
}
7472
}

0 commit comments

Comments
 (0)