]> git.saurik.com Git - wxWidgets.git/commitdiff
Ignore "%*" in the shell command strings in MSW registry.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 27 May 2010 17:07:46 +0000 (17:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 27 May 2010 17:07:46 +0000 (17:07 +0000)
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

index dae42f9ddf3504893fa555baaf0c253c1797407c..a067ac7de3b567a80f831d107b2a04a8abe404cf 100644 (file)
@@ -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;
 }