After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771652 - batch rename: segfault on undo after renaming attempt with empty filename
batch rename: segfault on undo after renaming attempt with empty filename
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.21.x
Other Linux
: Normal critical
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-19 12:01 UTC by Mohammed Sadiq
Modified: 2016-09-20 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace for crash (6.72 KB, text/plain)
2016-09-19 12:01 UTC, Mohammed Sadiq
  Details
batch-rename-dialog: disable rename button on empty name (1.68 KB, patch)
2016-09-19 18:37 UTC, Alexandru Pandelea
committed Details | Review

Description Mohammed Sadiq 2016-09-19 12:01:51 UTC
Created attachment 335850 [details]
Backtrace for crash

Nautilus segfaults on batch rename with 'Find and replace text' under certain conditions.

How to reproduce:
1. Create some files.
   touch 1 2
2. Select those files -> Rename
3. Select 'Find and Replace text'. Give '1' as existing text, and let the replacement text be empty.
4. Click Rename
5. Undo (ctrl+Z)

Result:
Nautilus now segfaults.
Comment 1 Alexandru Pandelea 2016-09-19 18:37:50 UTC
Created attachment 335875 [details] [review]
batch-rename-dialog: disable rename button on empty name

If the new name has no characters, then the Rename button will be
disabled.
Comment 2 Carlos Soriano 2016-09-20 08:28:17 UTC
Review of attachment 335875 [details] [review]:

Thanks for the patch! It looks good to me.

However for the future we would like to display a message of what is wrong, like "names cannot be empty". So let's leave the bug report open and mark it for 3.24.
Comment 3 Carlos Soriano 2016-09-20 16:22:47 UTC
Commit myself because I needed to test the commits bot :)

Attachment 335875 [details] pushed as f11e467 - batch-rename-dialog: disable rename button on empty name