fix: avoid overwriting broken symlinks on move (#2619)

This commit is contained in:
valoq authored and GitHub committed 2026-06-14 21:13:29 +02:00
1 parent f25c5c9964
commit 4ef4b734a5
1 file changed
+1 -1
+1 -1
View File
@@ -1424,7 +1424,7 @@ func (nav *nav) moveAsync(app *app, srcs []string, dstDir string) {
file := filepath.Base(src) file := filepath.Base(src)
dst := filepath.Join(dstDir, file) dst := filepath.Join(dstDir, file)
if dstStat, err := os.Stat(dst); err == nil { if dstStat, err := os.Lstat(dst); err == nil {
if os.SameFile(srcStat, dstStat) { if os.SameFile(srcStat, dstStat) {
sendErr("rename %s %s: source and destination are the same file", src, dst) sendErr("rename %s %s: source and destination are the same file", src, dst)
continue continue