diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index 06edad76..d112859e 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -918,9 +918,8 @@ func (manager *BackupManager) Restore(top string, revision int, inPlace bool, qu totalFileSize, downloadedFileSize, startDownloadingTime) { downloadedFileSize += file.Size downloadedFiles = append(downloadedFiles, file) - file.RestoreMetadata(fullPath, nil, setOwner) } - + file.RestoreMetadata(fullPath, nil, setOwner) } if deleteMode && len(patterns) == 0 { diff --git a/src/duplicacy_utils_others.go b/src/duplicacy_utils_others.go index 37ff4712..b3d9f2b0 100644 --- a/src/duplicacy_utils_others.go +++ b/src/duplicacy_utils_others.go @@ -69,7 +69,7 @@ func (entry *Entry) SetAttributesToFile(fullPath string) { newAttribute, found := entry.Attributes[name] if found { oldAttribute, _ := xattr.Getxattr(fullPath, name) - if bytes.Equal(oldAttribute, newAttribute) { + if !bytes.Equal(oldAttribute, newAttribute) { xattr.Setxattr(fullPath, name, newAttribute) } delete(entry.Attributes, name)