aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-02 21:09:52 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-03-24 13:44:04 +0100
commitedc34cc1a2865777cee6b325f705fb218955b593 (patch)
tree2d436d8aa1afec06e5b38c8c12411c151a830ef0 /src/libstore/store-api.cc
parent5a7e7fc35f934872a9e3e9e9043ff6894b36637a (diff)
Add function for quoting strings
(cherry picked from commit 7dcf5b011a0942ecf953f2b607c4c8d0e9e652c7)
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index b043feb0a..aacbe5e0b 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -741,12 +741,7 @@ std::string Store::showPaths(const StorePathSet & paths)
string showPaths(const PathSet & paths)
{
- string s;
- for (auto & i : paths) {
- if (s.size() != 0) s += ", ";
- s += "'" + i + "'";
- }
- return s;
+ return concatStringsSep(", ", quoteStrings(paths));
}