The issue was indeed in the "get free space" function. That particular function is "free_disk_space", in ext/native/file/free.cpp code is prety simple:
Code:
bool free_disk_space(const std::string &dir, uint64_t &space) {
#ifdef _WIN32
const std::wstring w32path = ConvertUTF8ToWString(dir);
ULARGE_INTEGER free;
if (GetDiskFreeSpaceExW(w32path.c_str(), &free, nullptr, nullptr)) {
space = free.QuadPart;
return true;
}
#else
struct statvfs diskstat;
int res = statvfs(dir.c_str(), &diskstat);
if (res == 0) {
#ifndef __ANDROID__
if (diskstat.f_flag & ST_RDONLY) {
space = 0;
return true;
}
#endif
space = (uint64_t)diskstat.f_bavail * (uint64_t)diskstat.f_frsize;
return true;
}
#endif
The issue is that, because of the Pandora file system, the ST_RDONLY flag was set. So, as a quick workaround, I change the
to
Code:
#if !defined(__ANDROID__) && !defined(PANDORA)
et voilà, no more "not enough free space"...