path: root/src/corelib
diff options
authorVolker Hilsheimer <>2019-06-19 20:11:19 +0200
committerVolker Hilsheimer <>2019-06-19 20:11:19 +0200
commitc086fc7341bcd57d0b7a459bb3ba7cfe1ccbd8be (patch)
tree0eedda84713c73961b93afdbe15446530e2e8db5 /src/corelib
parent6398588338dfea4161704e01216ba70b216a7a0b (diff)
Report correct data when multiple volumes are mounted to the same path
We read the data into the iterator from the system, but then recreate the QStorageInfo object based on the rootPath, and then stat, discarding the data in the iterator. We can overwrite the data with the information in the iterator, which partially fixes the issue. Volume information that can only be retrieved by stat'ing the root path, such as size information, will only be correct for one of the entries. Change-Id: Ie98590876d6a5f525af009f4ff5d595cbc308b3f Fixes: QTBUG-63209 Reviewed-by: Andrius Štikonas <> Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/corelib')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qstorageinfo_unix.cpp b/src/corelib/io/qstorageinfo_unix.cpp
index b7621b5d2f..11b5af069a 100644
--- a/src/corelib/io/qstorageinfo_unix.cpp
+++ b/src/corelib/io/qstorageinfo_unix.cpp
@@ -846,6 +846,9 @@ QList<QStorageInfo> QStorageInfoPrivate::mountedVolumes()
const QString mountDir = it.rootPath();
QStorageInfo info(mountDir);
+ info.d->device = it.device();
+ info.d->fileSystemType = it.fileSystemType();
+ info.d->subvolume = it.subvolume();
if (info.bytesTotal() == 0)