Bugfix: rename replaces parent directory (issue #3750)#3751
Open
jeth-ro wants to merge 2 commits intolinuxmint:masterfrom
Open
Bugfix: rename replaces parent directory (issue #3750)#3751jeth-ro wants to merge 2 commits intolinuxmint:masterfrom
jeth-ro wants to merge 2 commits intolinuxmint:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inentry_text_changed_cb()andcheckbox_toggled_cb().It kind of looks like this problem was foreseen as the
details->rename_buttonbutton widget is hidden after creation, but that looks to be undone by the subsequentgtk_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.cwhile 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.