aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-12-15 05:35:43 +0100
committerKim Alvefur <zash@zash.se>2012-12-15 05:35:43 +0100
commitc8ab15002f6c97e991198b72dcc1eb3f814f5536 (patch)
treefc2c8b6bbbc983b20cab69ef02c7da19bb9b7709
parent780ab598eafdbc687b3cb12fee8d4ef12eaa105d (diff)
parent324c4ff5745d3c32596ee20202e756996b9413ef (diff)
downloadprosody-c8ab15002f6c97e991198b72dcc1eb3f814f5536.tar.gz
prosody-c8ab15002f6c97e991198b72dcc1eb3f814f5536.zip
Merge 0.9->trunk
-rw-r--r--util/datamanager.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 08d9d6af..b70ad931 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -113,12 +113,9 @@ function getpath(username, host, datastore, ext, create)
if username then
if create then mkdir(mkdir(mkdir(data_path).."/"..host).."/"..datastore); end
return format("%s/%s/%s/%s.%s", data_path, host, datastore, username, ext);
- elseif host then
+ else
if create then mkdir(mkdir(data_path).."/"..host); end
return format("%s/%s/%s.%s", data_path, host, datastore, ext);
- else
- if create then mkdir(data_path); end
- return format("%s/%s.%s", data_path, datastore, ext);
end
end
@@ -343,7 +340,6 @@ end
function purge(username, host)
local host_dir = format("%s/%s/", data_path, encode(host));
- local deleted = 0;
local errs = {};
for file in lfs.dir(host_dir) do
if lfs.attributes(host_dir..file, "mode") == "directory" then