Diff

util/datamanager.lua @ 4112:09f0ba0cfbfc

util.datamanager: Change from 'Failed to load' to 'Assuming empty' for data store files that do not seem to exist
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Jan 2011 05:28:07 +0000
parent 4108:e3e3aa286334
child 4452:7de17ca4de14
line wrap: on
line diff
--- a/util/datamanager.lua	Tue Jan 11 05:04:08 2011 +0000
+++ b/util/datamanager.lua	Tue Jan 11 05:28:07 2011 +0000
@@ -115,7 +115,7 @@
 	if not data then
 		local mode = lfs.attributes(getpath(username, host, datastore), "mode");
 		if not mode then
-			log("debug", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
+			log("debug", "Assuming empty "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
 			return nil;
 		else -- file exists, but can't be read
 			-- TODO more detailed error checking and logging?
@@ -207,7 +207,7 @@
 	if not data then
 		local mode = lfs.attributes(getpath(username, host, datastore, "list"), "mode");
 		if not mode then
-			log("debug", "Failed to load "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
+			log("debug", "Assuming empty "..datastore.." storage ('"..ret.."') for user: "..(username or "nil").."@"..(host or "nil"));
 			return nil;
 		else -- file exists, but can't be read
 			-- TODO more detailed error checking and logging?