diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-02-01 14:51:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-02-01 14:51:14 +0800 |
commit | e233ebdd8e0de8be8124a041e41578db4e3c8231 (patch) | |
tree | 38d8696ccc7ac977effd187495d199c24935314b /script | |
parent | 35940149c14b5d15fbbf725e8f57360ebad90080 (diff) | |
download | lua-language-server-e233ebdd8e0de8be8124a041e41578db4e3c8231.zip |
use xpcall for scanning
Diffstat (limited to 'script')
-rw-r--r-- | script/filewatch.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/filewatch.lua b/script/filewatch.lua index 1c69ee50..cf3ae7b1 100644 --- a/script/filewatch.lua +++ b/script/filewatch.lua @@ -52,13 +52,13 @@ function m.watch(path, recursive, filter) if not filter or filter(fullpath:string()) then watch:add(fullpath:string()) log.debug('Watch add:', fullpath:string()) - scanDirctory(fullpath) + xpcall(scanDirctory, log.error, fullpath) end end end end - scanDirctory(fs.path(path)) + xpcall(scanDirctory, log.error, fs.path(path)) end m._watchings[path] = { count = 1, |