Bug 428153

Summary: Dolphin allows "/" (slash character) in filenames
Product: [Applications] dolphin Reporter: Sadi <sadiyumusak>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: dolphin-bugs-null, manuelschneid3r
Priority: NOR    
Version First Reported In: 19.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Suggestion to add a note in Dolphin's "Create New File" dialog

Description Sadi 2020-10-23 19:01:13 UTC
SUMMARY
Dolphin allows the user to include / (slash character) in a filename, even performing all file operations with it although it is not possible do anything on than file in terminal. 

STEPS TO REPRODUCE
1. In Dolphin window right click and select Create New > Text File...
2. Name it someting like "Invalid/Character/in/Filename.txt"
3. Perform some file operations in Dolphin, like copying, moving and sending to trash.

OBSERVED RESULT
All take place normally. 

EXPECTED RESULT
It shouldn't be possible to use / (slash character) in filenames and folder names. 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
The same applies to folder names as well although I see that there's a very old bug report (160949) about this and it's marked as RESOLVED FIXED.
Comment 1 Christoph Feck 2020-10-23 20:00:10 UTC
Dolphin replaces '/' character with the '⁄' character. Please use Tab (filename completion) in bash if you cannot copy the filename from the directory listing.
Comment 2 manuelschneid3r 2025-07-30 01:01:13 UTC
Please revert this behavior according to the POLA.

Users knowing that this is an invalid character won't use it anyway and in case end up confused, Google and find this bug. The others believe that they just entered a regular slash and will not be able to find/use it in other tools. 

You may think of this as a kind of feature, but this rather causes trouble for users.
Comment 3 Sadi 2025-07-30 09:12:54 UTC
(In reply to manuelschneid3r from comment #2)

Apparently, KDE/Dolphin developers have taken care of this by automatically replacing a slash character (ASCII forward slash, /, U+002F) with a similar looking character (fraction slash,  ⁄ , U+2044) in filenames, while treating it as a path separator, and automatically creating a sub-directory in folder names.
This is an intentional design choice (which I think is a good one).
For example, below is a terminal output to demonstrate it - after entering the name "Text/File.txt" to create a new text file in the user home directory, and then creating a folder named "Text", and another new text file named "file.txt" there, with different contents. You can see how forward slash was automatically replaced with fraction slash by Dolphin behid the scene in file 1:

file1="$(find . -mindepth 1 -maxdepth 1 -type f -name "*File*")"
file2="$(find ./Text -mindepth 1 -maxdepth 1 -type f -name "*File*")"

echo "$file1"
./Text⁄File.txt

echo "$file2"
./Text/File.txt

cat "$file1"
This file is under my "$HOME" directory, and is named "Text⁄File.txt"
Its full path is: "$HOME/Text⁄File.txt" (not "$HOME/Text/File.txt")

cat "$file2"
This file is under the directory "$HOME/Text", and is named "File.txt"
Its full path is: "$HOME/Text/File.txt"
Comment 4 manuelschneid3r 2025-07-30 09:21:59 UTC
Sure this may be nifty for power users, but it is _not_ intuitive. But I will _not_ get my dad (65yo) to get and remember this. _Please_ make this an option defaulting to disabled.
Comment 5 manuelschneid3r 2025-07-30 09:22:59 UTC
-But
Comment 6 Sadi 2025-07-30 10:33:27 UTC
Created attachment 183656 [details]
Suggestion to add a note in Dolphin's "Create New File" dialog

A suggestion to add a note in Dolphin's "Create New File" dialog as in the existing note in Dolphin's "Create New Folder" dialog  regarding the use of slashes in folder/file names.
Comment 7 manuelschneid3r 2025-07-30 10:49:09 UTC
Before you implement any alleged feature requests note that I meant the general behavior. The translation of slashes also happens in file name editor and probably in other places too. My concern is not that folders are created (this may break user expectations as well though) but the translation of the unicode code points which user are initially not aware of. Tbh I think almost all users don't even know that a fraction slash exists at all.