Conversation
real_update_menus() shows the default application at the top of the
context menu ("Open With <app>") only when every selected file opens in
an external application, but the loop over the selection read
selection->data instead of l->data, so only the first file was checked.
With "Run executable text files when they are opened" enabled and a
selection of files sharing the same default application, where the first
file opens in the application and another one is executable, the menu
showed "Open With <app>", but activating it ran the executable file
instead of opening it. Since show_app is also passed to
reset_open_with_menu() as filter_default (linuxmint#2350), the default
application was missing from the "Open With" submenu too. With the
executable file first in the selection, the menu was already correct.
Assisted-by: Claude Code:claude-opus-5-5
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.
real_update_menus()shows the default application at the top of the context menu ("Open With ") only when every selected file opens in an external application. The loop over the selection readselection->datainstead ofl->data, so only the first selected file was checked.Since
show_appis also whatreset_open_with_menu()uses asfilter_default(#2350), a wrong value affects both the top item and the "Open With" submenu.How to reproduce
a.sh(not executable) andb.sh(executable), sharing the same default application (e.g. gedit), and use the list view so thata.shis listed firstBefore:
a.shin gedit and runsb.shAfter:
Testing
Tested in a VM on Debian unstable with nemo 6.6.4, rebuilt with only this change (the code is the same on master): both orders of the selection, "Open With > gedit" on the mixed selection, and two non-executable files as a regression check.
I found it while checking about Debian bug #946870, the single-file case already fixed by #2350.