From 2c5432fe7f37330380fc5dae141b72f84f767617 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Sat, 23 May 2020 16:08:44 +0200 Subject: [PATCH] Mac OS X: skip timemachine backup Close #43 --- drivelistmodel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivelistmodel.cpp b/drivelistmodel.cpp index ad49920..28ccef5 100644 --- a/drivelistmodel.cpp +++ b/drivelistmodel.cpp @@ -75,6 +75,12 @@ void DriveListModel::refreshDriveList() if (i.size == 0 || i.isVirtual) continue; +#ifdef Q_OS_DARWIN + // Skip time machine backup. FIXME: is this best way to detect them? + if (i.mountpointLabels.size() && i.mountpointLabels.front() == "Time Machine Backups") + continue; +#endif + QString device = QString::fromStdString(i.device); drivesInNewList.insert(device);