fix: ui no longer blocks when volumes are unreachable + add support for network and fuse volumes
This commit is contained in:
@@ -24,6 +24,18 @@ QString DiskInfo::mount() const {
|
||||
return m_mount;
|
||||
}
|
||||
|
||||
// Display label. mount stays the full path because it is the identity used to
|
||||
// match entries across ticks, so this only shortens what the UI shows. For
|
||||
// physical disks mount is already the device name and is returned unchanged.
|
||||
QString DiskInfo::name() const {
|
||||
const qsizetype slash = m_mount.lastIndexOf(QLatin1Char('/'));
|
||||
if (slash < 0) {
|
||||
return m_mount;
|
||||
}
|
||||
const QString leaf = m_mount.mid(slash + 1);
|
||||
return leaf.isEmpty() ? m_mount : leaf;
|
||||
}
|
||||
|
||||
qreal DiskInfo::used() const {
|
||||
return static_cast<qreal>(m_usedBytes) / kKib;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user