mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 03:34:39 -06:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user