Changeset

7001:2743759ca1b5

util.datamanager: Return extra location info
author Kim Alvefur <zash@zash.se>
date Fri, 11 Dec 2015 20:31:19 +0100
parents 7000:2b57f77985a3
children 7002:9ab0d5e69c41
files util/datamanager.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/util/datamanager.lua	Fri Dec 11 20:30:39 2015 +0100
+++ b/util/datamanager.lua	Fri Dec 11 20:31:19 2015 +0100
@@ -220,7 +220,7 @@
 		-- File did probably not exist, let's create it
 		f, msg = io_open(filename, "w");
 		if not f then
-			return nil, msg;
+			return nil, msg, "open";
 		end
 	end
 
@@ -239,7 +239,7 @@
 	ok, msg = f:write(data);
 	if not ok then
 		f:close();
-		return ok, msg;
+		return ok, msg, "write";
 	end
 
 	ok, msg = f:close();
@@ -247,7 +247,7 @@
 		return ok, msg;
 	end
 
-	return true;
+	return true, pos;
 end
 
 local function list_append(username, host, datastore, data)