diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:48:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-07 00:48:13 +0800 |
commit | d4281c472d88b4c69ea1f2c76703a974aca940c2 (patch) | |
tree | 6629c274f390f4e2f61a38fd57fba9d7096bf8f8 /script/filewatch.lua | |
parent | 7c9503e0f1d2566a9a6df9f5c309af48972cabb3 (diff) | |
download | lua-language-server-d4281c472d88b4c69ea1f2c76703a974aca940c2.zip |
more `bee.filesystem`
Diffstat (limited to 'script/filewatch.lua')
-rw-r--r-- | script/filewatch.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/filewatch.lua b/script/filewatch.lua index 5e3a0322..1d75d1b3 100644 --- a/script/filewatch.lua +++ b/script/filewatch.lua @@ -7,11 +7,11 @@ local RENAME = 1 << 1 local function exists(filename) local path = fs.path(filename) - local suc, res = pcall(fs.exists, path) - if not suc or not res then + local suc, exsits = pcall(fs.exists, path) + if not suc or not exsits then return false end - suc, res = pcall(fs.canonical, path) + local suc, res = pcall(fs.canonical, path) if not suc or res:string() ~= path:string() then return false end |