GNOME Bugzilla – Bug 771398
crash on simple rename after batch rename
Last modified: 2016-09-21 20:52:04 UTC
In some cases, when batch rename executed without action, simple rename that follows segfaults Nautilus. How to reproduce: 1. Create some files. touch test1.txt test2.txt 2. Select those files -> rename -> Click Rename (ie, no change is actually made) 3. Now select the last item from the last renamed list (probably test2.txt) -> right click -> Rename 4. Give some text (can be reproduced even no change is made) -> Rename Result: Nautilus now segfaults. Expected result: Nautilus should rename the selected file with no segfaults.
Forgot to add corresponding debug message for segfault: ** ERROR:/home/sadiq/jhbuild/checkout/nautilus/src/nautilus-file.c:2481:nautilus_file_cancel: assertion failed: (op->file == file)
Created attachment 335610 [details] [review] file: Complete operation if all files skipped If all files are skipped, then the batch rename operation would not end appropriately. To fix this, end the operation when all files are skipped.
Review of attachment 335610 [details] [review]: Oh, big oversight. Thanks for the patch, feel free to commit after the following fixes: in the commit message tittle use lowercase "file: complete". ::: src/nautilus-file.c @@ +2358,3 @@ } + + if (op->skipped_files == g_list_length (files)) we use braces on single line ifs too now so: if { meh () }
wait no, don't commit. We are in hard code freeze. I'm going to open a branch for developing soon.
Review of attachment 335610 [details] [review]: after freeze
Created attachment 335611 [details] [review] file: complete operation if all files skipped If all files are skipped, then the batch rename operation would not end appropriately. To fix this, end the operation when all files are skipped.
Review of attachment 335611 [details] [review]: LGTM, the branch is wip/csoriano/next-master, thanks!
Attachment 335611 [details] pushed as 802713a - file: complete operation if all files skipped