Skip to content

Commit

Permalink
Merge branch 'jb50211_skip_rootfs' into 'mer-5.6'
Browse files Browse the repository at this point in the history
[qtbase] Skip rootfs in QStorageInfo. Contributes to JB#50211

See merge request mer-core/qtbase!62
  • Loading branch information
Tomin1 committed Jun 30, 2020
2 parents d63a8c6 + 78b606f commit dbd510d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/corelib/io/qstorageinfo_unix.cpp
Expand Up @@ -459,7 +459,10 @@ void QStorageInfoPrivate::initRootPath()
const QString mountDir = it.rootPath();
const QByteArray fsName = it.fileSystemType();
// we try to find most suitable entry
if (isParentOf(mountDir, oldRootPath) && maxLength < mountDir.length()) {
if (isParentOf(mountDir, oldRootPath)
&& (maxLength < mountDir.length()
// Alternative device that's not rootfs, overwrites pivoted root
|| (rootPath == mountDir && device == "rootfs"))) {
maxLength = mountDir.length();
rootPath = mountDir;
device = it.device();
Expand Down

0 comments on commit dbd510d

Please sign in to comment.