Do not report free space for swap partitions.
Swap partitions have no mount path so KDiskFreeSpaceInfo shows total free disk space available. BUG:357363
This commit is contained in:
parent
20bb8eba7e
commit
227c77e801
|
@ -206,7 +206,7 @@ static void readSectorsUsed(PedDisk* pedDisk, const Device& d, Partition& p, con
|
|||
|
||||
const KDiskFreeSpaceInfo freeSpaceInfo = KDiskFreeSpaceInfo::freeSpaceInfo(mountPoint);
|
||||
|
||||
if (p.isMounted() && freeSpaceInfo.isValid())
|
||||
if (p.isMounted() && freeSpaceInfo.isValid() && mountPoint != QStringLiteral())
|
||||
p.fileSystem().setSectorsUsed(freeSpaceInfo.used() / d.logicalSectorSize());
|
||||
else if (p.fileSystem().supportGetUsed() == FileSystem::cmdSupportFileSystem)
|
||||
p.fileSystem().setSectorsUsed(p.fileSystem().readUsedCapacity(p.deviceNode()) / d.logicalSectorSize());
|
||||
|
|
Loading…
Reference in New Issue