[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
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