Bug 309192 - KIO turns slash character ("/") into "⁄" when writing file names--but not directory names
Summary: KIO turns slash character ("/") into "⁄" when writing file names--but not dir...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.45.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: reproducible
Depends on:
Blocks: 400469
  Show dependency treegraph
 
Reported: 2012-10-29 12:02 UTC by Leandro Santiago da Silva
Modified: 2020-06-06 11:50 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 Leandro Santiago da Silva 2012-10-29 12:02:33 UTC
Dolphin doesn't trim extra slashes in the names of the directories I create visually. Til I know, the char slash "/" ist'n allowed to naming files or directories on unix systems.

Reproducible: Always

Steps to Reproduce:
1. In a empty area on screen, mouse right button, create new, directory (here it's translated, so I don't know if the original string is folder or directory)
2. in the dialog, type my new directory////
3. click in ok
Actual Results:  
it's created a new directory with the name "my new directory⁄⁄⁄"

Expected Results:  
the creation of a directory named "my new directory", without extra slashes
Comment 1 Mark 2012-10-30 13:05:04 UTC
Ohh nice one!

Frank, What's the intended case here? If one types:
"folder_name///"

Should that be interpreted as:
"folder_name"

And what if one types:
"folder////some_other_folder"

Should that be interpreted as:
"folder"
- "some_other_folder"
(so that you can create recursive folders)

Your input would be nice :)
Comment 2 Frank Reininghaus 2012-12-13 13:39:25 UTC
This replacement is actually made by KIO and is intentional, see

http://permalink.gmane.org/gmane.comp.kde.devel.kfm/13363
Comment 3 Aaron Peterson 2013-01-29 10:29:21 UTC
The intention is a bug.

A very serious one.  If KIO is so broken, the applications need to protect us from this.

If I tell it to make a / and it makes an arbitary ⁄
Comment 4 Mark 2013-01-29 10:38:34 UTC
Right, re-assigning to KIO to let them decide.
Comment 5 Nate Graham 2018-04-25 21:13:17 UTC
Doesn't happen for directories, but still happens for files. The inconsistency is not good.
Comment 6 Ahmad Samir 2020-06-02 13:09:14 UTC
For directory names it looks like KNewFileMenu if you type a/b/c, would create a, then b and c as sub-dirs of a.

The / is converted into a fraction slash because there is no way to have / as part of a file or dir names, because it's the dir path delimiter/separator:
https://commits.kde.org/kdelibs/53659edb4b1841474a23952746e68a1222756fec

Personally, I think / should be disallowed as part of file/dir names altogether... it has some potential side-effects, see bug 400469.
Comment 7 David Faure 2020-06-06 11:50:58 UTC
I can't reproduce this bug with today's directory creation dialog. It shows the structure that is about to be created, pretty precisely, and no fraction slash is involved.

Arguably it could trim trailing slashes to avoid showing a wrong structure like
 my new directory
   /
      /
          /

But that's a minor bug and not exactly the one reported here.

This bug is actually fixed.