File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ function Url:_parse_path_type()
252252 or (first_char == ' ~' and self .path :sub (2 , 2 ) == ' /' )
253253 then
254254 self .path_type = ' file'
255- self .realpath = fs .substitute_path (self .path ) or self .path
255+ self .realpath = fs .get_real_path (self .path , true ) or self .path
256256 return
257257 end
258258
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function M.substitute_path(path_str)
2121end
2222
2323--- @param filepath string
24- function M .get_real_path (filepath )
24+ function M .get_real_path (filepath , match )
2525 if not filepath then
2626 return false
2727 end
@@ -30,6 +30,12 @@ function M.get_real_path(filepath)
3030 return false
3131 end
3232 local real = vim .loop .fs_realpath (substituted )
33+ if match then
34+ -- if path ends with / , real needs too
35+ if filepath :sub (- 1 , - 1 ) == ' /' then
36+ real = real .. ' /'
37+ end
38+ end
3339 return real or false
3440end
3541
You can’t perform that action at this time.
0 commit comments