summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script-beta/files.lua4
-rw-r--r--script-beta/workspace/workspace.lua1
2 files changed, 5 insertions, 0 deletions
diff --git a/script-beta/files.lua b/script-beta/files.lua
index 2d2f00da..681245e3 100644
--- a/script-beta/files.lua
+++ b/script-beta/files.lua
@@ -77,6 +77,10 @@ function m.getLibraryPath(uri)
return m.libraryMap[uri]
end
+function m.flushAllLibrary()
+ m.libraryMap = {}
+end
+
--- 是否存在
---@return boolean
function m.exists(uri)
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua
index ce8cf161..08402bdb 100644
--- a/script-beta/workspace/workspace.lua
+++ b/script-beta/workspace/workspace.lua
@@ -298,6 +298,7 @@ function m.getRelativePath(uri)
end
function m.reload()
+ files.flushAllLibrary()
files.removeAllClosed()
rpath.flush()
await.call(m.awaitPreload)