wxString::Format() was used even when the first argument didn't contain
any %s, yet a string argument was always passed to it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64705
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (!archiver.empty()) {
const wxChar *fn = (options & PipeOut) != 0 ? wxT("-") : wxT("file");
if (!archiver.empty()) {
const wxChar *fn = (options & PipeOut) != 0 ? wxT("-") : wxT("file");
- descr << wxT(" (") << wxString::Format(archiver, fn) << wxT(")");
+ const wxString cmd = archiver.Contains("%s")
+ ? wxString::Format(archiver, fn)
+ : archiver;
+ descr << wxT(" (") << cmd << wxT(")");
}
if (!unarchiver.empty()) {
const wxChar *fn = (options & PipeIn) != 0 ? wxT("-") : wxT("file");
}
if (!unarchiver.empty()) {
const wxChar *fn = (options & PipeIn) != 0 ? wxT("-") : wxT("file");
- descr << wxT(" (") << wxString::Format(unarchiver, fn) << wxT(")");
+ const wxString cmd = unarchiver.Contains("%s")
+ ? wxString::Format(unarchiver, fn)
+ : unarchiver;
+ descr << wxT(" (") << cmd << wxT(")");