Bug 468908 - Dolphin can't open folders with special characters (e.g. Arabic characters, space, #, ?) when embedded Terminal is open (F4) with a non bash-compatible shell like nushell or zsh
Summary: Dolphin can't open folders with special characters (e.g. Arabic characters, s...
Status: REOPENED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 23.04.0
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-24 15:12 UTC by Munzir Taha
Modified: 2024-02-25 23:00 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Munzir Taha 2023-04-24 15:12:07 UTC
I can no longer open most of my Arabic folders in Dolphin. There is no issue if the folder name is brief. If the folder name is around 80+ characters, dolphin injects some random trash characters and tries to open them instead, complaining that the folder does not exist.


STEPS TO REPRODUCE
1. Create a folder with name
عربي عربي عربي عربي عربي عربي عربي عربي عربي

2. Double-click it in dolphin
3. Dolphin shows the following error
 
The file or folder /tmp/%D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%B1%D8%A8%D9%8A %D8%B9%D8%A does not exist.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Munzir Taha 2023-06-12 20:05:06 UTC
Fixed. Thanks.
Comment 2 Munzir Taha 2023-06-14 19:09:42 UTC
Unfortunately, it's not fixed, but the number of characters to reproduce the bug is now increased to 90 instead of 80.
Comment 3 Munzir Taha 2023-06-30 17:48:33 UTC
I just found the bug is related to me making nushell a default. It's actually not restricted to Arabic. If I create a folder with a name that ends in space, I get the same issue.

Create a folder named 'F '  with a trailing space. Trying to open it dolphin shows
The file or folder /tmp/F does not exist.
The space is not passed as part of the name. There is no problem using nushell from the terminal to access the folder, so I guess, the bug lies in dolphin integration to shells
Comment 4 hasezoey 2023-07-20 09:20:35 UTC
i think this bug and https://bugs.kde.org/show_bug.cgi?id=469585 are related to the same issue
Comment 5 Munzir Taha 2023-07-21 15:26:32 UTC
(In reply to hasezoey from comment #4)
> i think this bug and https://bugs.kde.org/show_bug.cgi?id=469585 are related
> to the same issue

What's the shell you are using? My bug only happens with nushell, but with bash I couldn't regenerate it.
Comment 6 hasezoey 2023-07-21 15:35:34 UTC
(In reply to Munzir Taha from comment #5)
> (In reply to hasezoey from comment #4)
> > i think this bug and https://bugs.kde.org/show_bug.cgi?id=469585 are related
> > to the same issue
> 
> What's the shell you are using? My bug only happens with nushell, but with
> bash I couldn't regenerate it.

no shell, as my bug report is about "Show Target" and and "Points to" (and clicking on it) to show error "file does not exist" with special characters that are not encoded / decoded correctly (in my case a question mark).
from what i can tell (at least from the original issue description) it sounds a lot like my bug, so i referenced it in case it is similar.

i have also now tried the original issue reproduction steps, and dolphin can create and open the folders just fine, until i have a embedded terminal open (zsh in my case), where:
- if you open the terminal from inside the folder, then dolphin starts to show "The file or folder ...path to arabic folder.. does not exist", but the shell opens just fine at the correct location
- if the shell is opened before going into the folder, dolphin immediately complains that the folder does not exist and zsh says "cd: no such file or directory", but still cd's into that folder correctly

the same conditions apply if i create a folder named "test?" (with a question mark) - ie a name to what my bug is about
Comment 7 hasezoey 2023-07-21 15:43:25 UTC
reproduction video https://www.youtube.com/watch?v=YQEvOPOA2Sg

@Munzir Taha is this the behavior you are also getting / describing?
Comment 8 Munzir Taha 2023-07-21 16:24:35 UTC
(In reply to hasezoey from comment #7)
> reproduction video https://www.youtube.com/watch?v=YQEvOPOA2Sg
> 
> @Munzir Taha is this the behavior you are also getting / describing?

Yes it's my bug, now try to change your shell from zsh to bash, and you shouldn't notice it!
Comment 9 Shinonome Tera tanuki 2024-02-25 22:56:07 UTC
I encountered similar problem.
To put it simply, when I use zsh as Dolphin's built-in terminal SHELL, if I cd a long directory, the path following the cd automatically executed by Dolphin will be truncated. (This sentence is translated from Google.)

My shell is zsh, my filesystem is xfs, and my distro is Arch Linux. The version of my dolphin is 23.08.5-1.

I assume that there is a path limit for dolphin terminal when it execute cd in the terminal.
But the problem only occurs when the shell is zsh.
If I set $SHELL as sh,bash or fish (like `SHELL=/usr/bin/fish dolphin`), dolphin works fine.

Sorry for my poor English.   :D