From d9cca8980332d948e5d6ec4884c090abc70f0218 Mon Sep 17 00:00:00 2001 From: Fabio Fantoni Date: Sun, 4 Oct 2026 16:01:00 +0200 Subject: [PATCH] nemo-view.c: Check all selected files before showing "Open With ". 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, 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 ", 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 (#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 --- src/nemo-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nemo-view.c b/src/nemo-view.c index 4c15f73fb..8330d4ee5 100644 --- a/src/nemo-view.c +++ b/src/nemo-view.c @@ -9807,7 +9807,7 @@ real_update_menus (NemoView *view) for (l = selection; l != NULL; l = l->next) { NemoFile *file; - file = NEMO_FILE (selection->data); + file = NEMO_FILE (l->data); if (!nemo_mime_file_opens_in_external_app (file)) { show_app = FALSE;