From 9dac57f9d9e1ce12bf027a450115cd52de3764e0 Mon Sep 17 00:00:00 2001 From: actboy168 Date: Wed, 13 Oct 2021 16:26:58 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0bee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/fs-utility.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/fs-utility.lua') diff --git a/script/fs-utility.lua b/script/fs-utility.lua index 529e8fcd..413114f0 100644 --- a/script/fs-utility.lua +++ b/script/fs-utility.lua @@ -434,7 +434,7 @@ local function fileSync(source, target, option) if isDir1 then if isDir2 then local fileList = m.fileList() - for filePath in target:list_directory() do + for filePath in fs.pairs(target) do fileList[filePath] = true end for filePath in source:list_directory() do @@ -558,7 +558,7 @@ function m.fileSync(source, target, option) end function m.scanDirectory(dir, callback) - for fullpath in dir:list_directory() do + for fullpath in fs.pairs(dir) do if fs.is_directory(fullpath) then m.scanDirectory(fullpath, callback) else -- cgit v1.2.3