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 --- 3rd/bee.lua | 2 +- script/fs-utility.lua | 4 ++-- script/language.lua | 2 +- script/library.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3rd/bee.lua b/3rd/bee.lua index 8284d3de..7a3b0ee7 160000 --- a/3rd/bee.lua +++ b/3rd/bee.lua @@ -1 +1 @@ -Subproject commit 8284d3deab137b66d626ba193476846ad011d5be +Subproject commit 7a3b0ee78564997fb3588c5abcc998625b39dbc9 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 diff --git a/script/language.lua b/script/language.lua index e3f92275..771dc948 100644 --- a/script/language.lua +++ b/script/language.lua @@ -4,7 +4,7 @@ local lloader = require 'locale-loader' local function supportLanguage() local list = {} - for path in (ROOT / 'locale'):list_directory() do + for path in fs.pairs(ROOT / 'locale') do if fs.is_directory(path) then list[#list+1] = path:filename():string():lower() end diff --git a/script/library.lua b/script/library.lua index 434a3bcf..f4511ee6 100644 --- a/script/library.lua +++ b/script/library.lua @@ -288,7 +288,7 @@ local function load3rdConfigInDir(dir, configs, inner) if not fs.is_directory(dir) then return end - for libraryDir in dir:list_directory() do + for libraryDir in fs.pairs(dir) do local suc, res = xpcall(loadSingle3rdConfig, log.error, libraryDir) if suc and res then if inner then -- cgit v1.2.3