When renaming a file or folder to something that contains a "/", several message boxes are displayed at once. If the file name contains more than one slash, even more message boxes are shown.
Dolphin used to replace "/" with "⁄" (I think it's the Unicode divisor symbol) on file renames. Note that when creating new files with names that contain slashes, they do get replaced.
Also, suppose you rename some file to "ab/c", and a folder "ab" exists, the file will actually get moved into the folder "ab" and renamed to "c", along with one or more error messages complaining that it could not rename the file.
Looks related to #211751
Steps to Reproduce:
1. Create file "abc"
2. Rename it to "ab/c"
3. Refresh view and note that the file was not renamed
4. Create folder "ab"
5. Rename "abc" to "ab/c"
6. Open folder "ab" and observe that the file has been moved and renamed there
Slashes be replaced with "⁄" on file renames to be consistent with behavior of creating new files with slashes in their name.
(In reply to comment #0)
> Expected Results:
> Slashes be replaced with "⁄" on file renames to be consistent with behavior
> of creating new files with slashes in their name.
I'm not quite sure if i would expect the same. I would either expect a file to be names as you type it, even if you put a slash in the name. Or it would work as a rename action/ so typing the name "test/file" will put the current file in the folder test with the name "file".
A third option i would be in favor of is just forbid the usage of "/" in new file names or renames. It is a directory separator and you really should not want to use that inside a filename.
Git commit fb190faac5bd0ca42eb0f437703f9f8fc407d334 by Emmanuel Pescosta.
Committed on 12/12/2012 at 22:57.
Pushed by emmanuelp into branch 'KDE/4.9'.
Fix Bug 240820 - [Usability Bug] Handling Bad Filenames, dolphin gives unclear error message
Fix Bug 308597 - Regression: Renaming a file/folder to something that contains a "/" will result in several message boxes
Uses the same solution as Dolphin-Rename-Dialog does. (KIO::encodeFileName)
Related: bug 240820
M +3 -2 dolphin/src/kitemviews/private/kitemlistroleeditor.cpp