diff options
| author | Liam Mitchell <[email protected]> | 2025-07-15 13:50:11 -0700 |
|---|---|---|
| committer | Liam Mitchell <[email protected]> | 2025-07-15 13:50:11 -0700 |
| commit | ed7167f8f86ce5be1d947cb99280c22e012d74f9 (patch) | |
| tree | f9d5745670d7eecdfabb3d28bce3568b21c5136c /src | |
| parent | 5.6.14 (diff) | |
| download | zen-ed7167f8f86ce5be1d947cb99280c22e012d74f9.tar.xz zen-ed7167f8f86ce5be1d947cb99280c22e012d74f9.zip | |
Don't add quotes to arguments which are already quoted
Diffstat (limited to 'src')
| -rw-r--r-- | src/zen/zen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zen/zen.cpp b/src/zen/zen.cpp index 598ef9314..64cdbf5c4 100644 --- a/src/zen/zen.cpp +++ b/src/zen/zen.cpp @@ -784,7 +784,8 @@ main(int argc, char** argv) std::string_view ThisArg(argv[j]); PassthroughArgV.push_back(std::string(ThisArg)); - const bool NeedsQuotes = (ThisArg.find(' ') != std::string_view::npos); + const bool NeedsQuotes = + (ThisArg.find(' ') != std::string_view::npos) && !(ThisArg.starts_with("\"") && ThisArg.ends_with("\"")); if (NeedsQuotes) { |