- change natives extraction to check for space *and* writability

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8515 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 73fb54b4b6
commit 65cbed47c6
  1. 2
      engine/src/desktop/com/jme3/system/Natives.java

@ -64,7 +64,7 @@ public class Natives {
} }
if (extractionDir == null) { if (extractionDir == null) {
File workingFolder = new File("").getAbsoluteFile(); File workingFolder = new File("").getAbsoluteFile();
if (workingFolder.getUsableSpace()>0) { if (workingFolder.getUsableSpace() == 0 || !workingFolder.canWrite()) {
logger.log(Level.WARNING, "Working directory is not writable. Using home directory instead."); logger.log(Level.WARNING, "Working directory is not writable. Using home directory instead.");
extractionDir = new File(JmeSystem.getStorageFolder(), extractionDir = new File(JmeSystem.getStorageFolder(),
"natives_" + Integer.toHexString(computeNativesHash())); "natives_" + Integer.toHexString(computeNativesHash()));

Loading…
Cancel
Save