Version: unspecified (using KDE 4.4.3)
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
Steps to Reproduce:
1) Select any file.
2) Try Adding '/' or any other forbidden character to filename, you get error
Got Error message saying "Cannot not rename file xxxx"
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
Mac OS: http://www.imagebam.com/image/61eb5a83354341
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.
This bug is a dup, but I cannot find the old report :-(
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.
Resetting assignee to default as per bug #305719
Tested this bug with Kubuntu 12.10 (KDE 4.9.2).
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)
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.
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
M +3 -2 dolphin/src/kitemviews/private/kitemlistroleeditor.cpp