Accept devices starting with /dev

BUG: 446899
This commit is contained in:
Tomaz Canabrava 2022-01-10 11:22:35 +00:00 committed by Andrius Štikonas
parent a8da9ef6c1
commit 825ca30ce7
1 changed files with 5 additions and 1 deletions

View File

@ -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();