Bug 494656 - If a folder has the wrong kind of characters, Dolphin can't open or remove or rename it
Summary: If a folder has the wrong kind of characters, Dolphin can't open or remove or...
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-13 12:41 UTC by Ellie
Modified: 2024-10-13 12:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Attached animation that shows what happens when trying to interact with the folder in Dolphin (84.08 KB, image/gif)
2024-10-13 12:41 UTC, Ellie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ellie 2024-10-13 12:41:28 UTC
Created attachment 174769 [details]
Attached animation that shows what happens when trying to interact with the folder in Dolphin

SUMMARY

If a folder has the wrong kind of characters, Dolphin can't open or remove or rename it

STEPS TO REPRODUCE

1. Create a maximum broken file name:

   $ python3
   Python 3.12.7 (main, Oct  7 2024, 07:18:03) [GCC 14.2.0] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> f = open("/dev/random", "rb")
   >>> s = f.read(64)
   >>> os.mkdir(s)

   (If the generated name has null bytes or forward slashes it might error,
   and you might need to repeat it)

2. Open Dolphin
3. Try to open or rename or delete folder

OBSERVED RESULT

See attached gif. Dolphin can't handle this.

EXPECTED RESULT

Dolphin uses some sort of surrogate encoding for non-Unicode paths so it doesn't ever break down no matter the file name, since the average user will be completely stuck at this point without any obvious options on how to fix this.

SOFTWARE/OS VERSIONS

Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: postmarketOS Edge based on Alpine
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION