┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Bucklin <[email protected]>2021-07-31 12:31:49 -0700
committerJordan Bucklin <[email protected]>2021-08-01 15:54:08 -0700
commitf190ae1cf8fc1c1bf0d87899a84f796a3e473032 (patch)
tree8d96544a730f3650b418a55a1a7f79b0fb3315b3 /src
parent7edce5a09c768805878d15e225cd063fb037cef3 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 76b482688..6e9ef0b2a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -202,7 +202,11 @@ int main(int argc, char **argv)
// If the user passed any URLs to Dolphin, open those in the
// window after session-restoring it
if (startedWithURLs) {
- mainWindow->openDirectories(urls, splitView);
+ if (openFiles) {
+ mainWindow->openFiles(urls, splitView);
+ } else {
+ mainWindow->openDirectories(urls, splitView);
+ }
}
} else {
qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!";