diff options
author | melkov <[email protected]> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:14 +0300 |
commit | 2c532b38e6aeb4fd88531027c7335690fd34c4e5 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /util/system/shellcommand.cpp | |
parent | 438546c8737d5c1fdeb31157dcf999717d930eec (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/system/shellcommand.cpp')
-rw-r--r-- | util/system/shellcommand.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp index 4200491e2eb..b1989b5c8c3 100644 --- a/util/system/shellcommand.cpp +++ b/util/system/shellcommand.cpp @@ -628,22 +628,22 @@ void TShellCommand::TImpl::StartProcess(TShellCommand::TImpl::TPipes& pipes) { #endif void ShellQuoteArg(TString& dst, TStringBuf argument) { - dst.append("\""); - TStringBuf l, r; + dst.append("\""); + TStringBuf l, r; while (argument.TrySplit('"', l, r)) { - dst.append(l); - dst.append("\\\""); + dst.append(l); + dst.append("\\\""); argument = r; - } + } dst.append(argument); - dst.append("\""); -} - + dst.append("\""); +} + void ShellQuoteArgSp(TString& dst, TStringBuf argument) { - dst.append(' '); + dst.append(' '); ShellQuoteArg(dst, argument); -} - +} + bool ArgNeedsQuotes(TStringBuf arg) noexcept { if (arg.empty()) { return true; |