From 1c8095439f8d738390b3cc19fa3f82853dd89f95 Mon Sep 17 00:00:00 2001 From: sumneko Date: Sun, 23 Jan 2022 03:43:08 +0800 Subject: fix test --- script/workspace/workspace.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'script/workspace/workspace.lua') diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index e064b424..5277f38e 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -250,9 +250,8 @@ end ---@async ---@param scp scope function m.awaitPreload(scp) - local displayedUri = scp.uri or '' - await.close('preload:' .. displayedUri) - await.setID('preload:' .. displayedUri) + await.close('preload:' .. scp:getName()) + await.setID('preload:' .. scp:getName()) await.sleep(0.1) local watchers = scp:get 'watchers' @@ -267,13 +266,13 @@ function m.awaitPreload(scp) local ld = loading.create(scp) scp:set('loading', ld) - log.info('Preload start:', displayedUri) + log.info('Preload start:', scp:getName()) local native = m.getNativeMatcher(scp) local librarys = m.getLibraryMatchers(scp) if scp.uri then - log.info('Scan files at:', displayedUri) + log.info('Scan files at:', scp:getName()) ---@async native:scan(furi.decode(scp.uri), function (path) ld:loadFile(furi.encode(path)) @@ -289,9 +288,9 @@ function m.awaitPreload(scp) watchers[#watchers+1] = fw.watch(furi.decode(libMatcher.uri)) end - log.info(('Found %d files at:'):format(ld.max), displayedUri) + log.info(('Found %d files at:'):format(ld.max), scp:getName()) ld:loadAll() - log.info('Preload finish at:', displayedUri) + log.info('Preload finish at:', scp:getName()) end --- 查找符合指定file path的所有uri -- cgit v1.2.3