Hello,

|Mac OS X El Capitan 10.11.6|.

I have an external drive. In my app, I monitor for it to be connected to PC. I use |QStorageInfo| for this providing it with the drive's root path.

On that drive I have a file with a known path to it. I need to check if the file exists once the drive is connected.

The problem is that once I connect the drive, |QStorageInfo| starts to return |true| for both |isValid| and |isReady|, but |QFile::exists| returns |false| while the file is really exists on the drive. It keeps returning |false| for a few seconds. After that seconds it starts returning |true|.

Is it a bug in Qt/MAC or am I missing something?

Qt 5.9.1.

P.S. It works fine on Windows 10.

Code Example.

|QStorageInfos(storageRootPath);if(s.isValid()&&s.isReady()){autoexists =QFile::exists(pathToFile);// getting false here for a few seconds}|

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to