From ea7d4f059d5cb81b51053e7fec6492a727a968c2 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 28 Jul 2021 12:54:10 -0600 Subject: Revert "Don't session-restore invalid paths" This reverts commit c733b3aa9787a618a0ce5bb03b3fc731f5663b21. There are people who prefer the old behavior of session-restoring all paths including the ones which are currently inaccessible. The idea is that Dolphin is like a web browser; if a website is not currently available, the browser tells you that instead of silently discarding the URL and showing you the homepage. Doing this can be considered a form of data loss. In addition, the reason for the change was to prevent Dolphin from showing invalid paths on launch for unmounted removable disks, but that specific case was fixed separately by switching to ~ for any tabs/views that were showing locations on a just-unmounted removable disk. So you will never run into the problem if yo unmount a disk in Dolphin and then close it. Accordingly, let's revert the change because it causes more problems than it resolves. BUG: 439864 CCBUG: 427619 FIXED-IN: 21.08 --- src/main.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index fba45f43c..76b482688 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -204,10 +204,6 @@ int main(int argc, char **argv) if (startedWithURLs) { mainWindow->openDirectories(urls, splitView); } - - // Now handle invalid locations in the set of active views to - // avoid issues like https://bugs.kde.org/show_bug.cgi?id=427619 - mainWindow->setViewsWithInvalidPathsToHome(); } else { qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; } -- cgit v1.3 From f190ae1cf8fc1c1bf0d87899a84f796a3e473032 Mon Sep 17 00:00:00 2001 From: Jordan Bucklin Date: Sat, 31 Jul 2021 12:31:49 -0700 Subject: 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 --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') 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!"; -- cgit v1.3