From 62b91200c729ccc036ba71835bc37539c058dcdb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 27 May 2010 17:07:46 +0000 Subject: [PATCH] Ignore "%*" in the shell command strings in MSW registry. Apparently "%*" can be used now in addition to the usual "%1" in the MSW shell command strings. As we don't support passing more than one file to a command at once anyhow, simply ignore them. At least this avoids errors when trying to open files with some extensions. Closes #12091. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/mimetype.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index dae42f9ddf..a067ac7de3 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -95,6 +95,15 @@ static bool CanonicalizeParams(wxString& command) } } + if ( foundFilename ) + { + // Some values also contain an addition %* expansion string which is + // presumably supposed to be replaced with the names of the other files + // accepted by the command. As we don't support more than one file + // anyhow, simply ignore it. + command.Replace(" %*", ""); + } + return foundFilename; } -- 2.45.2