mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Fix for issue #237: DirectoryManager.getFreeDiskSpace() returns kilobytes instead of bytes free
This commit is contained in:
parent
e9bb66622c
commit
94c1fb3e63
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user