fix(fs): dont set cloned=true if symlink already existed

This commit is contained in:
Folke Lemaitre 2022-12-02 11:24:23 +01:00
parent 59fb050767
commit 3e143c6017
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 0 additions and 2 deletions

View File

@ -35,10 +35,8 @@ M.symlink = {
run = function(self)
local stat = vim.loop.fs_lstat(self.plugin.dir)
if stat then
assert(stat.type == "link")
if vim.loop.fs_realpath(self.plugin.uri) == vim.loop.fs_realpath(self.plugin.dir) then
self.plugin._.installed = true
self.plugin._.cloned = true
return
else
vim.loop.fs_unlink(self.plugin.dir)