mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Addon saveResource overwriting was not working
The method saveResource can take a boolean as an argument to indicate that the resource should be overwritten from the jar. This was not working and is fixed.
This commit is contained in:
parent
b4a1398fcb
commit
a4362ce859
@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
@ -270,7 +271,7 @@ public abstract class Addon {
|
||||
// Make any dirs that need to be made
|
||||
outFile.getParentFile().mkdirs();
|
||||
if (!outFile.exists() || replace) {
|
||||
java.nio.file.Files.copy(in, outFile.toPath());
|
||||
java.nio.file.Files.copy(in, outFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
return outFile;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user