aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2025-07-15 13:50:11 -0700
committerLiam Mitchell <[email protected]>2025-07-15 13:50:11 -0700
commited7167f8f86ce5be1d947cb99280c22e012d74f9 (patch)
treef9d5745670d7eecdfabb3d28bce3568b21c5136c /src
parent5.6.14 (diff)
downloadzen-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.cpp3
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)
{