Return true if the directory is not exist for checking memory size
authorJiyeon Kim <jiyeon0402.kim@samsung.com>
Fri, 18 Oct 2013 06:50:42 +0000 (15:50 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 21 Oct 2013 02:08:39 +0000 (02:08 +0000)
[Title] Return true if the directory is not exist for checking memory size
[Problem] Web app doesn't launch or lockup occured
[Cause] If web app use web storage and launch first time, local storage is not exist
[Solution] If directory is not exist for checking memory size, QUOTA_EXCEEDED_ERR will not occured

Change-Id: I8e036e2d87b06526b8c4f479ff4722b2f396481e

Source/WebCore/platform/efl/tizen/FileSystemTizen.cpp

index 7ae49f1..7c51924 100644 (file)
@@ -141,10 +141,10 @@ bool haveEnoughSpace(const String& path, unsigned requestSize)
     struct statvfs buf;
     if (!statvfs(path.utf8().data(), &buf)) {
         unsigned long availableSize = buf.f_bavail * buf.f_bsize;
-        if (availableSize > requestSize)
-            return true;
+        if (availableSize < requestSize)
+            return false;
     }
-    return false;
+    return true;
 }
 }
 #endif