GetQuotedString() uses correct windows cmdline notation

- escaping of backslash and quotes
- fixes gh-312 for new cmdline parser algorithm (gh-307, gh-310)

Signed-off-by: Sergey G. Brester <info@sebres.de>
Reviewed-by: Tino Reichardt <milky-7zip@mcmilk.de>
This commit is contained in:
sebres
2023-04-06 20:00:56 +02:00
committed by Tino Reichardt
parent 19e97e4c68
commit eef99c5416
2 changed files with 38 additions and 3 deletions

View File

@@ -408,7 +408,8 @@ static UString GetQuotedReducedString(const UString &s)
UString s2 = s;
ReduceString(s2);
s2.Replace(L"&", L"&&");
return GetQuotedString(s2);
s2.InsertAtFront(L'"'); s2 += L'"'; // quote without GetQuotedString (because it escapes now)
return s2;
}
static void MyFormatNew_ReducedName(UString &s, const UString &name)