https://bugs.kde.org/show_bug.cgi?id=524014

            Bug ID: 524014
           Summary: "Open new windows in split view mode" breaks dolphin
                    --select and tries to open selected file as a folder
    Classification: Applications
           Product: dolphin
      Version First 26.04.3
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 194971
  --> https://bugs.kde.org/attachment.cgi?id=194971&action=edit
Screenshot showing the split view and "Trying to open a file as a folder" error
after running dolphin --select

SUMMARY

When the "Open new windows in split view mode" option is enabled,
running Dolphin with --select causes the selected file to also be
treated as a folder.

Dolphin opens the parent directory and correctly selects the file,
but at the same time displays an error:

Trying to open a file as a folder: file:///path/to/file

The problem disappears immediately when
"Open new windows in split view mode" is disabled.


STEPS TO REPRODUCE

1. Open Dolphin.
2. Go to Settings -> Configure Dolphin -> Interface -> Folders & Tabs.
3. Enable "Open new windows in split view mode".
4. Close all Dolphin windows.
5. Create a test file, for example:

   touch /tmp/dolphin-select-test.txt

6. Run:

   dolphin --select /tmp/dolphin-select-test.txt


OBSERVED RESULT

Dolphin opens the parent directory in split view and correctly selects
the requested file in both panes.

However, it also tries to treat the selected file as a directory and
displays the following error in both panes:

Trying to open a file as a folder:
file:///tmp/dolphin-select-test.txt

The terminal also prints:

kf.coreaddons: KDirWatch: "/tmp/dolphin-select-test.txt" is a file. Use
addFile!


EXPECTED RESULT

Dolphin should open the parent directory in split view and select the
requested file without trying to open the file itself as a directory.

No "Trying to open a file as a folder" error should be displayed.


REPRODUCIBILITY

Always.


WORKAROUND

Disabling:

Settings -> Configure Dolphin -> Interface -> Folders & Tabs ->
"Open new windows in split view mode"

completely fixes the problem.

With this option disabled, the same command:

   dolphin --select /tmp/dolphin-select-test.txt

opens the parent directory and selects the file correctly.


ADDITIONAL INFORMATION

The issue also affects "Show in Folder" from Firefox for downloaded
files. In that case Dolphin opens the download directory, selects the
downloaded file, but also tries to open the file itself as a folder.

Firefox is not required to reproduce the issue. The problem can be
reproduced directly using the dolphin --select command.

The issue was also tested with a clean Dolphin configuration. With a
clean configuration, where "Open new windows in split view mode" is
disabled by default, dolphin --select works correctly. Enabling this
option causes the problem to appear again.

Possibly related bug:
https://bugs.kde.org/show_bug.cgi?id=507619

Bug 507619 describes an issue where opening a folder externally while
split view is enabled opens the same folder in both panes.

This report is different because it can be reproduced directly with:

   dolphin --select <file>

and Dolphin incorrectly tries to treat the selected file itself as a
folder.


SOFTWARE/OS VERSIONS

Operating System: Garuda Linux (Arch Linux based)
Graphics Platform: Wayland

Dolphin: 26.04.3
KDE Plasma: 6.7.4
xdg-desktop-portal: 1.22.1
xdg-desktop-portal-kde: 6.7.4
Firefox: 153.0.3

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to