summaryrefslogtreecommitdiff
path: root/script-beta/workspace/workspace.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/workspace/workspace.lua')
-rw-r--r--script-beta/workspace/workspace.lua17
1 files changed, 3 insertions, 14 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua
index 0050e299..ce8cf161 100644
--- a/script-beta/workspace/workspace.lua
+++ b/script-beta/workspace/workspace.lua
@@ -125,8 +125,8 @@ function m.getLibraryMatchers()
for path, pattern in pairs(config.config.workspace.library) do
librarys[path] = pattern
end
- if library.metapath then
- librarys[library.metapath] = true
+ if library.metaPath then
+ librarys[library.metaPath] = true
end
m.libraryMatchers = {}
for path, pattern in pairs(librarys) do
@@ -153,17 +153,6 @@ function m.isIgnored(uri)
return ignore(path)
end
---- 文件是否作为库被加载
-function m.isLibrary(uri)
- local path = furi.decode(uri)
- for _, library in ipairs(m.getLibraryMatchers()) do
- if library.matcher(path) then
- return true
- end
- end
- return false
-end
-
local function loadFileFactory(root, progress, isLibrary)
return function (path)
local uri = furi.encode(root .. '/' .. path)
@@ -317,7 +306,7 @@ end
files.watch(function (ev, uri)
if ev == 'close'
and m.isIgnored(uri)
- and not m.isLibrary(uri) then
+ and not files.isLibrary(uri) then
files.remove(uri)
end
end)