Changeset

5061:e44b868cc575

mod_storage_appendmap: Fix keyvalue writes store_raw() takes a filename, unlike most other datamanager functions that take a series of path components, leading to this bug where it would write the hostname into a file named after the first argument (commonly a username) in the working directory.
author Kim Alvefur <zash@zash.se>
date Sun, 09 Oct 2022 21:35:18 +0200
parents 5060:bc491065c221
children 5062:38a0e3621181
files mod_storage_appendmap/mod_storage_appendmap.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_appendmap/mod_storage_appendmap.lua	Tue Sep 27 18:23:42 2022 +0100
+++ b/mod_storage_appendmap/mod_storage_appendmap.lua	Sun Oct 09 21:35:18 2022 +0200
@@ -106,7 +106,7 @@
 
 function keyval:set(user, keyvalues)
 	local data = serialize_map(keyvalues);
-	return dm.store_raw(user, module.host, self.store, "map", data);
+	return dm.store_raw(dm.getpath(user, module.host, self.store, "map"), data);
 end
 
 -- TODO some kind of periodic compaction thing?