From 95ba772e2d4f66c880ae8e7368b713c51b675101 Mon Sep 17 00:00:00 2001 From: "John K. Luebs" Date: Fri, 6 Oct 2023 03:58:38 -0500 Subject: [PATCH] Fix hardlink to symlink naming bug When creating cloned entries of hardlinked symlinks we have to preserve the target link data in the entry obviously. --- src/duplicacy_entry.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/duplicacy_entry.go b/src/duplicacy_entry.go index 20a69df..0a10205 100644 --- a/src/duplicacy_entry.go +++ b/src/duplicacy_entry.go @@ -126,18 +126,20 @@ func (entry *Entry) Copy() *Entry { func (entry *Entry) HardLinkTo(target *Entry, startChunk int, endChunk int) *Entry { endOffset := target.EndOffset + link := entry.Link if !target.IsFile() { startChunk = target.StartChunk endChunk = entry.EndChunk endOffset = entry.EndOffset + link = target.Link } return &Entry{ Path: entry.Path, Size: target.Size, Time: target.Time, Mode: target.Mode, - Link: entry.Link, + Link: link, Hash: target.Hash, UID: target.UID,