-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
6.9.1
-
None
-
Windows 10 64-bit
When I create two drives using command subst then listing the drives with then QStorageInfo does return correct results for some paths but for others it does not. When I create two drives using command subst then listing the drives with then QStorageInfo does return correct results for some paths but for others it does not. Interestingly, when the folder is created using net use X: \\localhost\c$\Users\Vlad then it works well.
#include <QDebug> #include <QStorageInfo> int main() { // Drive X: was created by command SUBST X: C:/Users/Vlad (existing folder!) // Drive Y: was created by command SUBST Y: C:/ // Drive Z: was created by command NET USE Z: \\localhost\c$\Users\Vlad // Output: // "C:/" true true // "X:/" false false - THIS IS INCORRECT! // "Y:/" true true - this is correct // "Z:/" true true - this is correct for (auto info : QStorageInfo::mountedVolumes()) { qDebug() << info.rootPath() << info.isValid() << info.isReady(); } }