Changeset

5246:eba55873ef29

Merge 0.9->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 15 Dec 2012 05:35:43 +0100
parents 5242:b86172b12912 (current diff) 5245:f29741c96090 (diff)
children 5249:d1baef49be21
files
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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