From 33fb6707718f9f7b5f9603fedaecee4bb5decb53 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 22 Oct 2011 17:32:26 +0000 Subject: [PATCH] - 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 --- engine/src/desktop/com/jme3/system/Natives.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/desktop/com/jme3/system/Natives.java b/engine/src/desktop/com/jme3/system/Natives.java index 548da00da..3dadc350d 100644 --- a/engine/src/desktop/com/jme3/system/Natives.java +++ b/engine/src/desktop/com/jme3/system/Natives.java @@ -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()));