Don't close file systems (otherwise game will crash)
This commit is contained in:
parent
89516870c9
commit
009028624e
1 changed files with 3 additions and 1 deletions
|
@ -374,10 +374,12 @@ public class ModUtil {
|
|||
URI uri = URI.create("jar:" + file.toUri());
|
||||
|
||||
FileSystem fs;
|
||||
boolean doClose = false;
|
||||
try {
|
||||
fs = FileSystems.getFileSystem(uri);
|
||||
}
|
||||
catch (Exception e) {
|
||||
doClose = true;
|
||||
fs = FileSystems.newFileSystem(file);
|
||||
}
|
||||
if (fs != null) {
|
||||
|
@ -396,7 +398,7 @@ public class ModUtil {
|
|||
catch (Exception e) {
|
||||
BCLib.LOGGER.error("Error for " + uri + ": " + e.toString());
|
||||
}
|
||||
fs.close();
|
||||
//if (doClose) fs.close();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue