diff options
m--------- | 3rd/bee.lua | 0 | ||||
-rw-r--r-- | script/fs-utility.lua | 4 | ||||
-rw-r--r-- | script/language.lua | 2 | ||||
-rw-r--r-- | script/library.lua | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/3rd/bee.lua b/3rd/bee.lua -Subproject 8284d3deab137b66d626ba193476846ad011d5b +Subproject 7a3b0ee78564997fb3588c5abcc998625b39dbc 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 |