# HG changeset patch # User Kim Alvefur # Date 1355546143 -3600 # Node ID eba55873ef2967c0c491789b920a51695cc3dbf4 # Parent b86172b12912d9f7972111458ba2efff2531097f# Parent f29741c960909a498d32d4a9c1e8704ffe4aed3b Merge 0.9->trunk diff -r b86172b12912 -r eba55873ef29 util/datamanager.lua --- a/util/datamanager.lua Sat Dec 15 07:12:32 2012 +0500 +++ b/util/datamanager.lua Sat Dec 15 05:35:43 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