Mercurial > prosody-hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 14173:44e5c73e6fa3 | 14174:604bed81808e |
|---|---|
| 666 elseif username then | 666 elseif username then |
| 667 local store_name = decode(node); | 667 local store_name = decode(node); |
| 668 if lfs.attributes(getpath(username, host, store_name, typ), "mode") then | 668 if lfs.attributes(getpath(username, host, store_name, typ), "mode") then |
| 669 return store_name; | 669 return store_name; |
| 670 end | 670 end |
| 671 elseif lfs.attributes(node, "mode") == "file" then | 671 elseif lfs.attributes(store_dir..node, "mode") == "file" then |
| 672 local file, ext = node:match("^(.*)%.([dalist]+)$"); | 672 local file, ext = node:match("^(.*)%.([dalist]+)$"); |
| 673 if ext == typ then | 673 if ext == typ then |
| 674 return decode(file) | 674 return decode(file) |
| 675 end | 675 end |
| 676 end | 676 end |
