diff --git a/MainWindow.cpp b/MainWindow.cpp index c32bf9e..8d90722 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -338,7 +338,7 @@ void MainWindow::deviceInserted(const QDBusObjectPath &object_path, { Q_UNUSED(interfaces_and_properties); - QRegExp reg("[0-9]+$"); + QRegExp reg("[1-9]+$"); QString path = object_path.path(); if (!path.startsWith("/org/freedesktop/UDisks2/block_devices")) @@ -360,7 +360,7 @@ void MainWindow::deviceRemoved(const QDBusObjectPath &object_path, { Q_UNUSED(interfaces); - QRegExp reg("[0-9]+$"); + QRegExp reg("[1-9]+$"); QString path = object_path.path(); if (!path.startsWith("/org/freedesktop/UDisks2/block_devices")) diff --git a/PlatformUdisks2.cpp b/PlatformUdisks2.cpp index 1ef57c0..ce21686 100644 --- a/PlatformUdisks2.cpp +++ b/PlatformUdisks2.cpp @@ -51,7 +51,7 @@ PlatformUdisks2::udisk2Enabled() void PlatformUdisks2::findDevices() { - QRegExp reg("[0-9]+$"); + QRegExp reg("[1-9]+$"); if (!udisk2Enabled()) {