From bdab27db1b2aa588067682429ea452d878c954dd Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Fri, 6 Sep 2019 01:21:28 +0800 Subject: [PATCH] fixed wrong return value from os.path.exists --- z.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/z.lua b/z.lua index 3ba3632..bc74d63 100755 --- a/z.lua +++ b/z.lua @@ -548,6 +548,9 @@ end -- file or path exists ----------------------------------------------------------------------- function os.path.exists(name) + if name == '/' then + return true + end local ok, err, code = os.rename(name, name) if not ok then if code == 13 then