# HG changeset patch # User Kim Alvefur # Date 1355546070 -3600 # Node ID f29741c960909a498d32d4a9c1e8704ffe4aed3b # Parent 4516e6bd51b4288f9c369fd1ff04bba0369e5ea3# Parent 775d98184acf8251c7b241084a6cb1f9d61906d9 Merge diff -r 4516e6bd51b4 -r f29741c96090 util/datamanager.lua --- 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