Bug 491192

Summary: cannot open files in dolphin from folder with trailing whitespaces
Product: [Applications] dolphin Reporter: Boris <durakov96>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: fanzhuyifan, kfm-devel
Priority: NOR    
Version: 24.05.2   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
URL: https://github.com/systemd/systemd/issues/33924
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Boris 2024-08-02 21:10:19 UTC
SUMMARY
Dolphin doesn't restrict to create and open folders with trailing whitespaces, but it's impossible to open any file from it with any program. Maybe it's connected with my system locale ru_RU.

STEPS TO REPRODUCE
1. create a folder "~/test ", in dolphin or from command line (may be it's neccessery to have a non-English keyboad layout, ru_RU)
2. create or copy to this folder any file, for example, "1.pdf"
3. open the folder "~/test " in dolphin and try to open the file "1.pdf" by clicking (it's okular in my case) or from context menu

OBSERVED RESULT
nothing to changes

EXPECTED RESULT
the file is opened in selected viewer, or any warning is showed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 6.9.10-1-MANJARO (64-bit)/Plasma 6.0.5
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION

I can easily open the file with command "okular ~/test\ /1.pdf", but can't to open from dolphin. When I delete trailing whitespace, where is no problem.

Here are the logs "LANG=en_US journalctl -xe", I tried to open file 1.pdf with okular and evince (the same with firefox and chromium):

авг 03 03:57:32 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:32 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:33 boris-hp systemd[927]: Started Dolphin - �<94>и�<81>пе�<82>�<87>е�<80> �<84>айлов.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 699.
авг 03 03:57:33 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:39 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:39 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:40 boris-hp systemd[927]: Started Dolphin - �<94>и�<81>пе�<82>�<87>е�<80> �<84>айлов.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 717.
авг 03 03:57:40 boris-hp plasmashell[1093]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
авг 03 03:57:42 boris-hp kioworker[11214]: kf.kio.core: An error occurred during write. The worker terminates now.
авг 03 03:57:44 boris-hp kioworker[11238]: kf.kio.core: An error occurred during write. The worker terminates now.
авг 03 03:57:48 boris-hp systemd[927]: Started Okular - �<9F>�<80>о�<81>мо�<82>�<80> док�<83>мен�<82>ов.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 735.
авг 03 03:57:48 boris-hp (okular)[11273]: app-org.kde.okular@c257479614264548b16e6099842a1072.service: Changing to the requested working directory failed: No such file or directory
авг 03 03:57:48 boris-hp (okular)[11273]: app-org.kde.okular@c257479614264548b16e6099842a1072.service: Failed at step CHDIR spawning /usr/bin/okular: No such file or directory
-- Subject: Process /usr/bin/okular could not be executed
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- The process /usr/bin/okular could not be executed and failed.
-- 
-- The error number returned by this process is ERRNO.
авг 03 03:57:48 boris-hp systemd[927]: app-org.kde.okular@c257479614264548b16e6099842a1072.service: Main process exited, code=exited, status=200/CHDIR
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- An ExecStart= process belonging to unit UNIT has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 200.
авг 03 03:57:48 boris-hp systemd[927]: app-org.kde.okular@c257479614264548b16e6099842a1072.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- The unit UNIT has entered the 'failed' state with result 'exit-code'.
авг 03 03:57:48 boris-hp wpa_supplicant[813]: wlo1: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-44 noise=9999 txrate=243000
авг 03 03:57:49 boris-hp dolphin[11189]: kf.purpose.externalprocess: Cannot initialize model for plugin type "Export" with data QJsonObject(): missing key "urls"
авг 03 03:57:53 boris-hp systemd[927]: Started �<9F>�<80>о�<81>мо�<82>�<80> док�<83>мен�<82>ов.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 753.
авг 03 03:57:53 boris-hp (evince)[11289]: app-org.gnome.Evince@6595cdcc848840ee9803100762f0580d.service: Changing to the requested working directory failed: No such file or directory
авг 03 03:57:53 boris-hp (evince)[11289]: app-org.gnome.Evince@6595cdcc848840ee9803100762f0580d.service: Failed at step CHDIR spawning /usr/bin/evince: No such file or directory
-- Subject: Process /usr/bin/evince could not be executed
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- The process /usr/bin/evince could not be executed and failed.
-- 
-- The error number returned by this process is ERRNO.
авг 03 03:57:53 boris-hp systemd[927]: app-org.gnome.Evince@6595cdcc848840ee9803100762f0580d.service: Main process exited, code=exited, status=200/CHDIR
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- An ExecStart= process belonging to unit UNIT has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 200.
авг 03 03:57:53 boris-hp systemd[927]: app-org.gnome.Evince@6595cdcc848840ee9803100762f0580d.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- The unit UNIT has entered the 'failed' state with result 'exit-code'.
авг 03 03:57:57 boris-hp systemd[927]: Started Firefox - �<92>еб-б�<80>а�<83>зе�<80>.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: https://forum.manjaro.org/c/support
-- 
-- A start job for unit UNIT has finished successfully.
-- 
-- The job identifier is 771.
Comment 1 fanzhuyifan 2024-08-03 18:50:31 UTC
also cannot open such files via `kde-open ...` So the underlying problem might be in kio instead of dolphin.
Comment 2 fanzhuyifan 2024-08-03 20:06:19 UTC
upstream systemd issue: https://github.com/systemd/systemd/issues/33924