File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,13 @@ function mt:loadFile(uri, libraryUri)
7676 self .max = self .max + 1
7777 self :update ()
7878 self ._stash [# self ._stash + 1 ] = function ()
79- local content = util .loadFile (furi .decode (uri ))
8079 self .read = self .read + 1
80+ if files .getFile (uri ) then
81+ files .addRef (uri )
82+ log .info ((' Skip loaded file: %s' ):format (uri ))
83+ return
84+ end
85+ local content = util .loadFile (furi .decode (uri ))
8186 self :update ()
8287 if not content then
8388 return
@@ -98,8 +103,13 @@ function mt:loadFile(uri, libraryUri)
98103 self .max = self .max + 1
99104 self :update ()
100105 self ._stash [# self ._stash + 1 ] = function ()
101- local content = util .loadFile (furi .decode (uri ))
102106 self .read = self .read + 1
107+ if files .getFile (uri ) then
108+ files .addRef (uri )
109+ log .info ((' Skip loaded file: %s' ):format (uri ))
110+ return
111+ end
112+ local content = util .loadFile (furi .decode (uri ))
103113 self :update ()
104114 if not content then
105115 return
You can’t perform that action at this time.
0 commit comments