From f1d8ad7fce66aa04a539ef6eab4e1daae531ea4a Mon Sep 17 00:00:00 2001 From: Krzysztof Kotowicz Date: Mon, 27 May 2024 18:26:35 +0200 Subject: [PATCH] Fix quoting. --- contrib/OpenInExplorer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/OpenInExplorer.lua b/contrib/OpenInExplorer.lua index 64d478a..1633a1a 100644 --- a/contrib/OpenInExplorer.lua +++ b/contrib/OpenInExplorer.lua @@ -130,7 +130,7 @@ local function call_list_of_files_osx(selected_images) for _, image in pairs(selected_images) do current_image = image.path..PS..image.filename -- AppleScript needs double quoted strings, and the whole command is wrapped in single quotes. - table.insert(cmds, string.format(reveal_file_osx_cmd, string.gsub(string.gsub(current_image, "'", "'\\''"), "\"", "\\\"") )) + table.insert(cmds, string.format(reveal_file_osx_cmd, string.gsub(string.gsub(current_image, "\"", "\\\""), "'", "'\"'\"'"))) end reveal_cmd = table.concat(cmds, ",") run_cmd = string.format(open_files.macos, reveal_cmd)