File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,10 @@ function m.getLibraryMatchers()
134
134
135
135
local librarys = {}
136
136
for path , pattern in pairs (config .config .workspace .library ) do
137
- librarys [path ] = pattern
137
+ librarys [m . normalize ( path ) ] = pattern
138
138
end
139
139
if library .metaPath then
140
- librarys [library .metaPath ] = true
140
+ librarys [m . normalize ( library .metaPath ) ] = true
141
141
end
142
142
m .libraryMatchers = {}
143
143
for path , pattern in pairs (librarys ) do
@@ -294,11 +294,13 @@ end
294
294
function m .normalize (path )
295
295
if platform .OS == ' Windows' then
296
296
path = path :gsub (' [/\\ ]+' , ' \\ ' )
297
+ :gsub (' [/\\ ]+$' , ' ' )
297
298
:gsub (' ^%a+%:' , function (str )
298
299
return str :upper ()
299
300
end )
300
301
else
301
302
path = path :gsub (' [/\\ ]+' , ' /' )
303
+ :gsub (' [/\\ ]+$' , ' ' )
302
304
end
303
305
return path :gsub (' ^[/\\ ]+' , ' ' )
304
306
end
You can’t perform that action at this time.
0 commit comments