File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 77 + ` no-implicit-any ` : renamed to ` no-unknown `
88* ` CHG ` formatter: no longer need` --preview `
99* ` FIX ` semantic: color of ` function `
10+ * ` FIX ` [ #1027 ] ( https://github.com/sumneko/lua-language-server/issues/1027 )
1011* ` FIX ` [ #1028 ] ( https://github.com/sumneko/lua-language-server/issues/1028 )
1112
1213## 2.6.8
Original file line number Diff line number Diff line change 3535
3636m .reset ()
3737
38- local fixedUri = {}
39- --- 获取文件的真实uri
38+ local uriMap = {}
39+ -- 获取文件的真实uri,但不穿透软链接
4040--- @param uri uri
4141--- @return uri
4242function m .getRealUri (uri )
@@ -47,16 +47,19 @@ function m.getRealUri(uri)
4747 return uri
4848 end
4949 suc , res = pcall (fs .canonical , path )
50- if not suc or res : string (): gsub ( ' / ' , ' \\ ' ) == filename then
50+ if not suc then
5151 return uri
5252 end
5353 filename = res :string ()
5454 local ruri = furi .encode (filename )
55- if uri ~= ruri and not fixedUri [ruri ] then
56- fixedUri [ruri ] = true
55+ if uri == ruri then
56+ return ruri
57+ end
58+ if not uriMap [ruri ] then
59+ uriMap [ruri ] = uri
5760 log .warn ((' Fix real file uri: %s -> %s' ):format (uri , ruri ))
5861 end
59- return ruri
62+ return uriMap [ ruri ]
6063end
6164
6265--- 打开文件
You can’t perform that action at this time.
0 commit comments