From 3853d4d8a9a2478c3afa4126a97bcbc65208a8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 5 Jul 2022 17:48:09 +0800 Subject: fix #1278 --- script/workspace/require-path.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'script/workspace/require-path.lua') diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua index fbe559ad..24a0b025 100644 --- a/script/workspace/require-path.lua +++ b/script/workspace/require-path.lua @@ -111,14 +111,6 @@ function m.findUrisByRequirePath(suri, path) tracy.ZoneBeginN('findUrisByRequirePath') local results = {} local searchers = {} - for uri in files.eachDll() do - local opens = files.getDllOpens(uri) or {} - for _, open in ipairs(opens) do - if open == fspath then - results[#results+1] = uri - end - end - end ---@type collector local clt = scope.getScope(suri):get('requireName') @@ -137,6 +129,15 @@ function m.findUrisByRequirePath(suri, path) end end + for uri in files.eachDll() do + local opens = files.getDllOpens(uri) or {} + for _, open in ipairs(opens) do + if open == fspath then + results[#results+1] = uri + end + end + end + tracy.ZoneEnd() return results, searchers end -- cgit v1.2.3