Skip to content

Commit

Permalink
fix: [mount] no automount for optical devices
Browse files Browse the repository at this point in the history
  • Loading branch information
itsXuSt committed Jan 17, 2024
1 parent c69d879 commit 4e8763b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dfm-base/base/device/devicemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,13 @@ void DeviceManagerPrivate::mountAllBlockDev()
const QStringList &devs { q->getAllBlockDevID(DeviceQueryOption::kMountable | DeviceQueryOption::kNotIgnored
| DeviceQueryOption::kNotMounted) };
qCInfo(logDFMBase) << "start to mount block devs: " << devs;
for (const auto &dev : devs)
for (const auto &dev : devs) {
if (dev.startsWith("/org/freedesktop/UDisks2/block_devices/sr")) {
qCInfo(logDFMBase) << "no auto mount for optical devices." << dev;
continue;
}
q->mountBlockDevAsync(dev, { { "auth.no_user_interaction", true } }); // avoid the auth dialog raising
}
}

bool DeviceManagerPrivate::isDaemonMountRunning()
Expand Down

0 comments on commit 4e8763b

Please sign in to comment.