From 825ca30ce71061da4d628077803d39d0ab998cf6 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 10 Jan 2022 11:22:35 +0000 Subject: [PATCH] Accept devices starting with /dev BUG: 446899 --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 67d0dea..49af66c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -115,7 +115,11 @@ int Q_DECL_IMPORT main(int argc, char* argv[]) // device is the selected device minus the partition number. // we need all of them to select properly the things on screen. - const QString selectedDevice = parser.value(deviceOption); + + QString selectedDevice = parser.value(deviceOption); + if (selectedDevice.startsWith(QStringLiteral("/dev/"))) { + selectedDevice.remove(QStringLiteral("/dev/")); + } auto [device, partitionNr] = parseDevice(selectedDevice); MainWindow* mainWindow = new MainWindow();