Bug 308597 - Regression: Renaming a file/folder to something that contains a "/" will result in several message boxes
Summary: Regression: Renaming a file/folder to something that contains a "/" will resu...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: general (show other bugs)
Version: 2.1
Platform: Archlinux Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 12:04 UTC by Jan
Modified: 2012-12-12 22:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan 2012-10-18 12:04:41 UTC
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

Reproducible: Always

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


Expected Results:  
Slashes be replaced with "⁄" on file renames to be consistent with behavior of creating new files with slashes in their name.
Comment 1 Mark 2012-10-30 19:14:44 UTC
(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.
Comment 2 Emmanuel Pescosta 2012-12-12 20:14:24 UTC
Review-Request: https://git.reviewboard.kde.org/r/107681/
Comment 3 Emmanuel Pescosta 2012-12-12 22:04:20 UTC
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
REVIEW: 107681
FIXED-IN: 4.9.5

M  +3    -2    dolphin/src/kitemviews/private/kitemlistroleeditor.cpp

http://commits.kde.org/kde-baseapps/fb190faac5bd0ca42eb0f437703f9f8fc407d334