From 94c1fb3e636852212baa534067c93dc538859874 Mon Sep 17 00:00:00 2001 From: macdonst Date: Tue, 20 Sep 2011 22:44:18 +0800 Subject: [PATCH] Fix for issue #237: DirectoryManager.getFreeDiskSpace() returns kilobytes instead of bytes free --- framework/src/com/phonegap/FileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/com/phonegap/FileUtils.java b/framework/src/com/phonegap/FileUtils.java index 6d6ad655..29b1dd3c 100755 --- a/framework/src/com/phonegap/FileUtils.java +++ b/framework/src/com/phonegap/FileUtils.java @@ -120,7 +120,7 @@ public class FileUtils extends Plugin { else if (action.equals("requestFileSystem")) { long size = args.optLong(1); if (size != 0) { - if (size > DirectoryManager.getFreeDiskSpace()) { + if (size > (DirectoryManager.getFreeDiskSpace()*1024)) { JSONObject error = new JSONObject().put("code", FileUtils.QUOTA_EXCEEDED_ERR); return new PluginResult(PluginResult.Status.ERROR, error); }