diff mod_storage_appendmap/mod_storage_appendmap.lua @ 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 6a7b7cb7148e
children ea6c18ec0669
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?