File tree Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ local Explorer = {}
13
13
Explorer .__index = Explorer
14
14
15
15
function Explorer .new (cwd )
16
- cwd = utils . path_normalize (cwd or uv .cwd ())
16
+ cwd = uv . fs_realpath (cwd or uv .cwd ())
17
17
return setmetatable ({
18
18
cwd = cwd ,
19
19
nodes = {}
Original file line number Diff line number Diff line change @@ -208,24 +208,4 @@ function M.file_exists(path)
208
208
return error == nil
209
209
end
210
210
211
- --- @param num number elements to take
212
- --- @param list table elements
213
- --- @return table
214
- function M .take (num , list )
215
- local t = {}
216
- for i , c in ipairs (list ) do
217
- if i > num then break end
218
- table.insert (t , c )
219
- end
220
- return t
221
- end
222
-
223
- --- @param path string
224
- --- @return string
225
- function M .path_normalize (path )
226
- local components = vim .split (vim .fn .expand (path ), path_separator )
227
- local num_dots = # vim .tbl_filter (function (v ) return v == " .." end , components )
228
- return M .path_join (M .take (# components - num_dots * 2 , components ))
229
- end
230
-
231
211
return M
You can’t perform that action at this time.
0 commit comments