Bug 251830 - Dolphin allows you to safely place slashes in file names, but for folder names, doing this creates a folder hierarchy
Summary: Dolphin allows you to safely place slashes in file names, but for folder name...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 358567 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-20 16:22 UTC by alex
Modified: 2018-04-24 16:48 UTC (History)
6 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 alex 2010-09-20 16:22:37 UTC
Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

When creating a new directory within Dolphin, or by selecting the 'New Folder' button in a Save File dialog the user is able to enter in a string such as 'foo/bar'. This results in a directory being created called 'foo/bar' - with the forward slash. This can causes confusion and directories shouldn't contain this char that represents the forward slash.

Reproducible: Always

Steps to Reproduce:
1) Open Dolphin -> File -> Create New -> Folder ...
2) Enter in 'foo/bar'
3) Press 'ok'

Actual Results:  
A directory is created with the name 'foo⁄bar':

[acartwright:~]$ ls -1 | grep foo
foo⁄bar                                                                                               
[acartwright:~]$ cd foo⁄bar/                                                              
[acartwright:~/foo⁄bar]$ ls                                                               
[acartwright:~/foo⁄bar]$ cd ../
[acartwright:~]$ 

Expected Results:  
Either an error message, or create sub folders from the provided name. i.e ~/foo and ~/foo/bar directories should have been made.
Comment 1 Hans-Rudi Denzler 2010-09-20 18:06:59 UTC
mkdir foo/bar
mkdir: kann Verzeichnis „foo/bar“ nicht anlegen: Datei oder Verzeichnis nicht gefunden

mkdir -p foo/bar
Comment 2 Christoph Feck 2010-09-20 18:43:46 UTC
Are you sure the '/' character isn't replaced with '⁄'? Note that these are different Unicode characters, and it may depend on the font whether you actually see a difference.
Comment 3 Hans-Rudi Denzler 2010-09-20 22:13:11 UTC
You are right. 2 different chars: If I copy "foo⁄bar" from dolphin to gvim and search for '/' only the '/' I entered in gvim directly is found. So dolphin and konsole are consistent.
Comment 4 alex 2010-09-21 10:10:03 UTC
Yes it is a different char, however Konsole displays it as the normal '/' char here. Either way, it causes confusion since it's creating a directory named something I didn't want. Personally I feel it would be best to allow a name such as 'foo/bar' to create the 'foo' directory and then 'bar' within that.
Comment 5 Hans-Rudi Denzler 2010-09-21 12:03:28 UTC
Konsole with Monospace 12:
/: 0x2F (input dolphin)
⁄: 0xE2 0x81 0x84 (output dolphin/Konsole)

Using Okteta you can see that the slopes of the UTF-8 slashes are different.
Comment 6 Hans-Rudi Denzler 2010-09-21 14:48:36 UTC
KCharSelect > SOLIDUS '/' alias slash > FRACTION SLASH '⁄' alias solidus

Have fun with confusion
Comment 7 Christoph Feck 2010-09-21 17:00:03 UTC
When the user creates a folder named "Holiday 2009/2010" he surely does not want "2010" to be a subdirectory.

There could be a message stating that '/' characters are not allowed in names, and giving the user the option
* to revert and enter a different name
* to replace that char with the similar looking '⁄' or a non-similar '_' char.
* to ask if he really wants to create a two-level directory hierarchy.

IMHO silently replacing the character is not nice.

Are there any other characters which are not valid in file/directory names? How do other applications handle that?
Comment 8 Nate Graham 2018-04-13 17:46:03 UTC
*** Bug 358567 has been marked as a duplicate of this bug. ***