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

            Bug ID: 503344
           Summary: Application start fails for files within a directory
                    ending in a space
    Classification: Plasma
           Product: plasmashell
           Version: 6.3.4
          Platform: Neon
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: m...@apache.org
                CC: k...@davidedmundson.co.uk
  Target Milestone: 1.0

SUMMARY
I think this is an issue in the systemd integration but I couldn't find a
matching component (or maybe product).

Originally my partner encountered this when she tried to open a picture in
Gwenview in a folder which happened to end in a space (for whatever reasons: by
clicking on it in Dolphin. Below are steps to reproduce this via the shell.

It looks like the WorkingDirectory option in the dynamically (?) generated
systemd unit is not set correctly.


STEPS TO REPRODUCE
mkdir ${XDG_RUNTIME_DIR:-/run/user/$(id -n)}/spacetest
cd ${XDG_RUNTIME_DIR:-/run/user/$(id -n)}/spacetest
mkdir 1 '2 ' # note the trailing space for the second folder
echo foo | tee 1/test.txt '2 /test.txt'

journalctl -n 0 --cursor-file=cursor
xdg-open 1/test.txt # this works

xdg-open '2 /test.txt' # no new kwrite
journalctl --cursor-file=cursor

OBSERVED RESULT

First KWrite startes, second doesn't:

> Apr 25 17:12:03 localhost systemd[1449]: Started 
> app-org.kde.kwrite@20ca3cb0cad24040886911becdb4f2e9.service - KWrite - Text 
> Editor.
> Apr 25 17:12:03 localhost kwrite[142123]: libkate.time: All plugins loaded in 
> 0 ms
> Apr 25 17:12:03 localhost kwrite[142123]: libkate.time: Created 
> KateMainWindow in 62 ms
> Apr 25 17:12:10 localhost systemd[1449]: Started 
> app-org.kde.kwrite@2dc65ec6abb047f2bf75df452d544ea7.service - KWrite - Text 
> Editor.
> Apr 25 17:12:10 localhost (kwrite)[142197]: 
> app-org.kde.kwrite@2dc65ec6abb047f2bf75df452d544ea7.service: Changing to the 
> requested working directory failed: No such file or directory
> Apr 25 17:12:10 localhost systemd[1449]: 
> app-org.kde.kwrite@2dc65ec6abb047f2bf75df452d544ea7.service: Main process 
> exited, code=exited, status=200/CHDIR
> Apr 25 17:12:10 localhost systemd[1449]: 
> app-org.kde.kwrite@2dc65ec6abb047f2bf75df452d544ea7.service: Failed with 
> result 'exit-code'.

EXPECTED RESULT

Two KWrites

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.3
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.3
Kernel Version: 6.11.0-24-generic (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

systemctl --user cat
app-org.kde.kwßrite@2dc65ec6abb047f2bf75df452d544ea7.service | sed -e
'/WorkingDirectory/!d' -e 's/$/EOL/'
WorkingDirectory=/run/user/1000/spacetest/2 EOL

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

Reply via email to