Commit 8c4f3ba1 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

if remote filesystems is disabled, don't show them (they will never be scanned anyways)

parent f6256517
...@@ -115,8 +115,9 @@ void SummaryWidget::createDiskMaps() ...@@ -115,8 +115,9 @@ void SummaryWidget::createDiskMaps()
{ {
Disk const &disk = it.value(); Disk const &disk = it.value();
if (disk.free == 0 && disk.used == 0) if (disk.free == 0 && disk.used == 0) {
continue; continue;
}
QWidget *volume = new QWidget(this); QWidget *volume = new QWidget(this);
QVBoxLayout *volumeLayout = new QVBoxLayout(volume); QVBoxLayout *volumeLayout = new QVBoxLayout(volume);
...@@ -158,7 +159,11 @@ void SummaryWidget::createDiskMaps() ...@@ -158,7 +159,11 @@ void SummaryWidget::createDiskMaps()
DiskList::DiskList() DiskList::DiskList()
{ {
static const QSet<QByteArray> ignoredFsTypes = { "tmpfs", "squashfs", "autofs" }; QSet<QByteArray> ignoredFsTypes = { "tmpfs", "squashfs", "autofs" };
if (!Config::scanRemoteMounts) {
ignoredFsTypes += Config::remoteFsTypes;
}
for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) { for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
if (!storage.isReady() || ignoredFsTypes.contains(storage.fileSystemType())) { if (!storage.isReady() || ignoredFsTypes.contains(storage.fileSystemType())) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment