Bug 240820 - [Usability Bug] Handling Bad Filenames, dolphin gives unclear error message
Summary: [Usability Bug] Handling Bad Filenames, dolphin gives unclear error message
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-05 18:28 UTC by Gaurish
Modified: 2012-12-12 22:04 UTC (History)
4 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 Gaurish 2010-06-05 18:28:07 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                Linux

While trying to rename a file to other name which uses forbidden characters like '/' dolphin throws up unclear error message which leaves user clueless what actually is the problem and why is the error message showing up. many people might presume that users would know why this error message occurs, but its not the case. My mom spend about 30minutes trying to rename the file again & again, Until I told her that character like '/' cannot be part of filename. 

it should be been great if the same thing would have been told in error message itself.

This could one more step towards user friendly kde

Reproducible: Always

Steps to Reproduce:
1) Select any file.
2) Try Adding '/' or any other forbidden character to filename, you get error 

Actual Results:  
Got Error message saying "Cannot not rename file xxxx"
Image: http://www.imagebam.com/image/a3b7a983354336

Expected Results:  
It would be great if the error message would informed the user that filename contain forbidden character and he/she should choose a different name without chose special characters 

Also, listing how other Systems handle the this, which is quite better than our implementation 

Windows XP:http://www.imagebam.com/image/9499ca83354338
Mac OS: http://www.imagebam.com/image/61eb5a83354341
Comment 1 FiNeX 2010-08-01 17:07:21 UTC
Confirmed: a better message should be displayed. Anyway dolphin behave like the shell.

For example in bash, if you try to create a file with "/" in the name, you will have the same error.
Comment 2 FiNeX 2010-08-01 17:12:22 UTC
This bug is a dup, but I cannot find the old report :-(
Comment 3 Frank Reininghaus 2010-09-08 23:30:39 UTC
It's a bit more complicated than I thought at first sight: Using the rename dialog, you actually can put a "/" into the name in one case: if there is a subfolder named "a" in the current folder, you can rename the file "ab" to "a/b" - it will be moved to the subfolder and get the new name "b" in this case.

Moving the file fails if there is no subfolder with that name. But I agree that a better error message might be helpful.
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:45 UTC
Resetting assignee to default as per bug #305719
Comment 5 Grigoriadis Grigoris 2012-10-27 19:45:26 UTC
Tested this bug with Kubuntu 12.10 (KDE 4.9.2).

General Observations:

1. You can create a file that starts with '/'.

2. You can create a file or directory with the following name
`~!@#$%^&*()_+=][{}\';⁄.,:"|?><

3. You can create a directory a/b (it will not create a subfolder just a directory named a/b)

Buggy behaviors:

1. If you have a file with name 'a' and a directory with name 'b' and you rename the a to b/a you will get an error message saying that the file cannot be renamed but it will be actually moved under directory b. This happens only when renaming a file, if you create a file named b/a it will be successfully created (not under b directory).

2. Create a file with name 'b' rename that file to '/a/b' (a directory doesn't exist). You will get an error message 'The file or folder xxx does not exist' after clicking ok a second error message will appear 'Could not rename file xxx' (this message might appear several times) after clicking ok dolphin will display the file with the /a/b name but if you reload the directory you will see that the name hasn't change.

3. If you try to create a folder /a you will get an error message 'Access denied to /a'.

4. If you try to create a folder /a/ab you will get an error message 'Could not make folder /a/ab/'. It doesn't matter if the a directory exists.

Checking the source code i found that:

1. For behaviors 3,4 dolphin uses the KNewFileMenu which resides in the kdelibs/kfile.

2. For behaviors 1,2 dolphin uses the KonqOperations::rename which resides in the kde-baseapss/lib/konq.
Comment 6 Emmanuel Pescosta 2012-10-30 19:26:59 UTC
Review-Request: https://git.reviewboard.kde.org/r/107139/
Comment 7 Emmanuel Pescosta 2012-12-12 20:15:04 UTC
Review-Request: https://git.reviewboard.kde.org/r/107681/
Comment 8 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 308597
REVIEW: 107681
FIXED-IN: 4.9.5

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

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