From 3fed8a598553579887a7275807aefc42334cb812 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sat, 6 Jun 2020 12:54:10 +1000 Subject: [PATCH] fixed fs.copy oops --- module/fs.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/fs.lua b/module/fs.lua index c1aa163..0287eba 100644 --- a/module/fs.lua +++ b/module/fs.lua @@ -68,7 +68,11 @@ function fs.copy(from,to) -- string string -- boolean -- copies a file from *fro if not of or not df then return false end - df:write(of:read("*a")) + local tmp + repeat + tmp = of:read(2048) + df:write(tmp or "") + until not tmp df:close() of:close() return true