Index: sources/storage/FileHandler.cpp =================================================================== diff -u -r79a6cfcb10472261f3ec26eaf0baf6f1245cd311 -r86e9dfbff50cb7e16fd94c16c1c818cef3b47eac --- sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 79a6cfcb10472261f3ec26eaf0baf6f1245cd311) +++ sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 86e9dfbff50cb7e16fd94c16c1c818cef3b47eac) @@ -272,7 +272,11 @@ if (path.at(lastIndex) == "/") path.remove(lastIndex, 1); // check to see if the path in the list of mounted rootPaths /// DEBUG: qDebug() << " +++++ " << QStorageInfo::mountedVolumes(); - foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) { + // FIXME : This function blocks the Device controller thread + // It has been observed during the USB plug test and getting the drive info(space) that + // immediately after the mount this function laggs to get the information for about 2-5 sec. + auto mountedVolumes = QStorageInfo::mountedVolumes(); + foreach (const QStorageInfo &storage, mountedVolumes) { if (storage.isValid() && storage.isReady()) { if ( storage.rootPath() == path ) { if (vIsReadOnly) *vIsReadOnly = storage.isReadOnly();