Commit f190ae1c authored by Jordan Bucklin's avatar Jordan Bucklin
Browse files

Fix how --select treats files

Previously, when passing file URLs with the --select option,
Dolphin would open the file in its corresponding application, as
well as opening an empty tab in Dolphin as if the file were a
directory. This happens specifically when trying to restore a
session.

This commit prevents Dolphin from opening a file in an application
and from opening an empty tab while passing the --select option,
and selects the URLs instead.

BUG: 436584
parent 7edce5a0
...@@ -202,8 +202,12 @@ int main(int argc, char **argv) ...@@ -202,8 +202,12 @@ int main(int argc, char **argv)
// If the user passed any URLs to Dolphin, open those in the // If the user passed any URLs to Dolphin, open those in the
// window after session-restoring it // window after session-restoring it
if (startedWithURLs) { if (startedWithURLs) {
if (openFiles) {
mainWindow->openFiles(urls, splitView);
} else {
mainWindow->openDirectories(urls, splitView); mainWindow->openDirectories(urls, splitView);
} }
}
} else { } else {
qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment