Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.4.1
Description
The following lines:
QString extstorage = qgetenv("EXTERNAL_STORAGE");
QString tmpPath = QDir::tempPath();
QStorageInfo info1(extstorage);
QStorageInfo info2(tmpPath);
qWarning()<<extstorage<<info1.isValid()<<info1.bytesAvailable()<<info1.bytesFree()<<info1.bytesTotal();
qWarning()<<tmpPath<<info2.isValid()<<info2.bytesAvailable()<<info2.bytesFree()<<info2.bytesTotal();
give:
"/storage/emulated/legacy" false 0 0 0
"/data/data/org.qtproject.qtvlm/files" true 5275557888 5275557888 9929424896
my app has "WRITE_EXTERNAL_STORAGE" permission. I am trying to check that there is enough space available before writing some data (~300Mb). There is space available and if I ignore this control it works perfectly, so I think there is a problem with QStorageInfo in that case.
Philippe Lelong