Skip to content

Bugfix: rename replaces parent directory (issue #3750)#3751

Open
jeth-ro wants to merge 2 commits intolinuxmint:masterfrom
jeth-ro:bugfix-rename-replace-parent-directory
Open

Bugfix: rename replaces parent directory (issue #3750)#3751
jeth-ro wants to merge 2 commits intolinuxmint:masterfrom
jeth-ro:bugfix-rename-replace-parent-directory

Conversation

@jeth-ro
Copy link
Copy Markdown

@jeth-ro jeth-ro commented Mar 31, 2026

This protects against the issue described in #3750 by asserting that the new name used when resolving a conflict via rename cannot be blank. Also ensure that the Rename button is actually hidden prior to file_list_ready_cb() so as to create an initial state consistent with the show/hide logic around the replace/rename buttons in entry_text_changed_cb() and checkbox_toggled_cb().

It kind of looks like this problem was foreseen as the details->rename_button button widget is hidden after creation, but that looks to be undone by the subsequent gtk_widget_show_all() call.

Unfortunately I wasn't actually able to test this on master as I cannot get that to run on my computer. This was fixed and tested against the v6.4.5 tag which matches my distro's current stable package. I did run git diff master libnemo-private/nemo-file-conflict-dialog.c while on the 6.4.5 tag and do not see anything that changes the picture. Appreciate this is not an ideal way to submit a PR, but given the changes are so trivial am hoping to get away with it...

I dare say that the whole half-baked conflict dialog while the directory scan runs is a bit odd from a UX perspective. For example, it might state in the empty space atop the dialog that the directory is still being enumerated. The expander might also be disabled until the dialog is fully valid (as it will show a blank entry, which is confusing although I think it will now at least be safe).

Am happy to further develop this PR to include such things if desired, but felt it made sense to start with a minimum fix.

jeth-ro added 2 commits April 1, 2026 01:40
No call to nemo_file_conflict_dialog_get_new_name() would usually be
possible while entry is empty, but can be made to happen, see linuxmint#3750.
Ensure the existing attempt to hide details->rename_button is not
undone by the call to gtk_widget_show_all() at the end of the
nemo_file_conflict_dialog_init() function.

Fixes linuxmint#3750.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant