fix(trash): mac error deleting dangling symbolic links to trash (#251)
This commit is contained in:
parent
a128e6f75c
commit
49b2b3f4a5
1 changed files with 2 additions and 2 deletions
|
|
@ -204,14 +204,14 @@ M.delete_to_trash = function(path, cb)
|
|||
local basename = vim.fs.basename(path)
|
||||
local trash_dir = get_trash_dir()
|
||||
local dest = fs.join(trash_dir, basename)
|
||||
uv.fs_stat(
|
||||
uv.fs_lstat(
|
||||
path,
|
||||
vim.schedule_wrap(function(stat_err, src_stat)
|
||||
if stat_err then
|
||||
return cb(stat_err)
|
||||
end
|
||||
assert(src_stat)
|
||||
if uv.fs_stat(dest) then
|
||||
if uv.fs_lstat(dest) then
|
||||
local date_str = vim.fn.strftime(" %Y-%m-%dT%H:%M:%S")
|
||||
local name_pieces = vim.split(basename, ".", { plain = true })
|
||||
if #name_pieces > 1 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue