GNOME Bugzilla – Bug 754616
trying to rename a file with a / report an error "Folder names cannot contain /"
Last modified: 2015-09-10 15:48:01 UTC
Whether it is a folder or a file, if a / is inserted in the rename dialog, the message returned is "Folder names cannot contain". I think I spot the error in src/natilus-files-view.c, validate_file_name is always called with is_folder set to TRUE
Indeed, do you wank to make a patch?
Created attachment 310725 [details] [review] not-working patch Not working patch :/ I added a check with validate_file_name but it seems it doesn't solve the problem despite is_folder is properly set accordingly. If you some advices.
So, existing_file is to check if there is a file duplicated. The file that is being renamed is pointed by the data->target file. So you need to check that one =)
And fwiw, if you want interactive help, don't hesitate to go to IRC #nautilus channel and reach me :)
Hi Carlos, Thanks for the help. I found the data->target_is_folder is what I wanted to use. Patch coming
Created attachment 310930 [details] [review] Pass proper type of target in validate_filename
Review of attachment 310930 [details] [review]: Code looks good thanks! The commit message is not good though, can you follow the Gnome guidelines for it? https://wiki.gnome.org/GnomeLove/CodeContributionWorkflow#Commit_guidelines
Created attachment 311008 [details] [review] Correct commit message
Review of attachment 311008 [details] [review]: Commit message now looks good except that on the first line you need to put the file affected: "files-view: ass proper type of file to validate_file_name" You can commit with that nit fixed. Thanks for the work!
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
https://git.gnome.org/browse/nautilus/commit/?id=ab4f340d43b1e4f9d040c574a2470826e8c7b883