use more reliable renamer, update Stitch - fix #46

This commit is contained in:
asie
2018-12-23 19:18:40 +01:00
parent 4700788ead
commit 0b38f3ecc5
4 changed files with 18 additions and 9 deletions

View File

@@ -91,8 +91,10 @@ public class SourceRemapper {
}
source = new File(destination.getAbsolutePath().substring(0, destination.getAbsolutePath().lastIndexOf('.')) + "-dev.jar");
if (!destination.renameTo(source)) {
throw new RuntimeException("Could not rename " + destination.getName() + "!");
try {
com.google.common.io.Files.move(destination, source);
} catch (IOException e) {
throw new RuntimeException("Could not rename " + destination.getName() + "!", e);
}
}