diff util/datamanager.lua @ 14174:604bed81808e 13.0

util.datamanager: Fix listing of host stores lfs returns the basename of the directory entry, and the check neglected to prefix the data path directory before calling lfs.attribute(), which resulted in checking Prosody's current working directory for the file instead.
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 May 2026 13:23:03 +0100
parents 7ffb2d3ab50b
children
line wrap: on
line diff
--- a/util/datamanager.lua	Mon May 25 13:14:53 2026 +0100
+++ b/util/datamanager.lua	Mon May 25 13:23:03 2026 +0100
@@ -668,7 +668,7 @@
 					if lfs.attributes(getpath(username, host, store_name, typ), "mode") then
 						return store_name;
 					end
-				elseif lfs.attributes(node, "mode") == "file" then
+				elseif lfs.attributes(store_dir..node, "mode") == "file" then
 					local file, ext = node:match("^(.*)%.([dalist]+)$");
 					if ext == typ then
 						return decode(file)