diff options
-rw-r--r-- | server/src/async/scanfiles.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/async/scanfiles.lua b/server/src/async/scanfiles.lua index 04867377..f5249c8e 100644 --- a/server/src/async/scanfiles.lua +++ b/server/src/async/scanfiles.lua @@ -46,7 +46,10 @@ end for _, data in ipairs(args) do local root = fs.path(data.root) - scan(data.mode, root, data.pattern, data.options) + local suc, err = xpcall(scan, debug.traceback, data.mode, root, data.pattern, data.options) + if not suc then + ERR:push(err) + end end OUT:push 'ok' |