Software /
code /
prosody
Changeset
5245:f29741c96090
Merge
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 15 Dec 2012 05:34:30 +0100 |
parents | 5241:4516e6bd51b4 (current diff) 5244:775d98184acf (diff) |
children | 5246:eba55873ef29 5247:9257f4c47ffa |
files | |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/util/datamanager.lua Sat Dec 15 07:08:54 2012 +0500 +++ b/util/datamanager.lua Sat Dec 15 05:34:30 2012 +0100 @@ -113,12 +113,9 @@ 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 @@ 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