aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/db.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/db.cc')
-rw-r--r--src/libstore/db.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc
index e792a371b..5c8e7edec 100644
--- a/src/libstore/db.cc
+++ b/src/libstore/db.cc
@@ -366,9 +366,12 @@ void Database::setString(const Transaction & txn, TableId table,
void Database::setStrings(const Transaction & txn, TableId table,
- const string & key, const Strings & data)
+ const string & key, const Strings & data, bool deleteEmpty)
{
- setString(txn, table, key, packStrings(data));
+ if (deleteEmpty && data.size() == 0)
+ delPair(txn, table, key);
+ else
+ setString(txn, table, key, packStrings(data));
}