Skip to content

Commit

Permalink
fix: avoid error of readdir()
Browse files Browse the repository at this point in the history
  • Loading branch information
Milly committed May 6, 2024
1 parent e404fb1 commit d4c15a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/fern/scheme/file/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ if exists('*readdir')
let l:Profile = fern#profile#start('fern#scheme#file#util#list_entries_readdir')
let s = s:is_windows ? '\' : '/'
let p = a:path[-1:] ==# s ? a:path : (a:path . s)
return s:Promise.resolve(readdir(a:path))
silent! let children = readdir(a:path)
return s:Promise.resolve(children)
\.then(s:AsyncLambda.map_f({ v -> p . v }))
\.finally({ -> Profile() })
endfunction
Expand Down

0 comments on commit d4c15a5

Please sign in to comment.