[dolphin] [Bug 467978] New: --select fails when dolphin already displays home directory

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Thu Mar 30 17:35:25 BST 2023


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

            Bug ID: 467978
           Summary: --select fails when dolphin already displays home
                    directory
    Classification: Applications
           Product: dolphin
           Version: 22.08.3
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: dolphin-bugs-null at kde.org
          Reporter: glyphimor at gmail.com
                CC: kfm-devel at kde.org
  Target Milestone: ---

SUMMARY

Normally, running "dolphin --select file1"  displays file1's parent directory
and selects file1, in a new or existing dolphin window/tab. However, if a
dolphin window is already displaying the user's home directory, running
"dolphin --select file1" doesn't work: the existing ~ window receives focus,
but nothing else happens. Note that adding the --new-window argument bypasses
the bug: "dolphin --select file1 --new-window" works.

STEPS TO REPRODUCE

I have command line tests for 6 scenarios; 4 work and 2 fail. All dolphin
windows need to be closed before each test. I included a sleep command so each
test can be copy-pasted, rather than run line by line.

#setup
mkdir dolphin_test
cd dolphin_test
touch file1
mkdir dir0

#test 0 works: no dolphin windows
dolphin --select file1

#test 1 works: test dir already open in dolphin
dolphin . &
sleep 3s
dolphin --select file1

#test 2 works: other dir already open in dolphin
dolphin dir0 &
sleep 3s
dolphin --select file1

#test 3 fails: ~ already open in dolphin
dolphin ~ &
sleep 3s
dolphin --select file1

#test 4 works: ~ and test dir already open in dolphin
dolphin ~ . &
sleep 3s
dolphin --select file1

#test 5 fails: ~ and other dir already open in dolphin
dolphin ~ dir0 &
sleep 3s
dolphin --select file1

OBSERVED RESULT

(for a failing test) The dolphin window/tab displaying the user's home
directory receives focus.

EXPECTED RESULT

Dolphin displays the dolphin_test directory and selects file1.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

Summarizing, if ~ is already open in a dolphin window/tab, "dolphin --select
file1" doesn't work, UNLESS file1's parent directory is already open in
dolphin.

Also, all tests work correctly if you add the --new-window argument: "dolphin
--select file1 --new-window".

The trigger for failure appears to be the user's home directory, even if a
different directory is set as the dolphin default (in Settings -> Configure
Dolphin... -> Startup -> Show on startup).

--select used to work normally for me; this bug appeared perhaps a year ago.

To briefly explain a use case for --select: I have an application w/ a "view
directory in file browser"-type feature to allow the user to easily
rename/move/etc a file. The --select feature is quite helpful, especially when
there are a large number of files in the directory. The --new-window argument
does work, but can be somewhat annoying if you end up running --select multiple
times, especially for files in the same directory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list