- change natives extraction to use getUsableSpace(), which checks for user permissions etc. too.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8509 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2011-10-22 17:32:26 +00:00
parent 8f3ef3babd
commit 33fb670771

View File

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