From 12d27922f7bb7f466b5d476fa2c1ddc08a300513 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 20 Oct 2016 07:28:32 +0200 Subject: sync with Context as of 2016-10-20 Signed-off-by: Philipp Gesang --- lualibs-file.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lualibs-file.lua') diff --git a/lualibs-file.lua b/lualibs-file.lua index b6822e9..f2a27ad 100644 --- a/lualibs-file.lua +++ b/lualibs-file.lua @@ -607,14 +607,17 @@ function file.robustname(str,strict) end end -file.readdata = io.loaddata -file.savedata = io.savedata +local loaddata = io.loaddata +local savedata = io.savedata + +file.readdata = loaddata +file.savedata = savedata function file.copy(oldname,newname) if oldname and newname then - local data = io.loaddata(oldname) + local data = loaddata(oldname) if data and data ~= "" then - file.savedata(newname,data) + savedata(newname,data) end end end -- cgit v1.2.3