From 4d762f9cbf3c441160c53af1695fd77af3db48f2 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 14 Dec 2012 14:21:32 +0100 Subject: util.datamanager: Remove dead code path --- util/datamanager.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'util/datamanager.lua') diff --git a/util/datamanager.lua b/util/datamanager.lua index 08d9d6af..2290d565 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 -- cgit v1.2.3 From 1d8297ca4f2e491fa3e3cf5f3416337f19d31e7c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 14 Dec 2012 14:25:58 +0100 Subject: util.datamanager: Remove unused variable --- util/datamanager.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'util/datamanager.lua') diff --git a/util/datamanager.lua b/util/datamanager.lua index 2290d565..b70ad931 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -340,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 -- cgit v1.2.3