mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 11:44:45 -06:00
Fixed 2 bugs in restoring extended attributes
This commit is contained in:
@@ -918,9 +918,8 @@ func (manager *BackupManager) Restore(top string, revision int, inPlace bool, qu
|
|||||||
totalFileSize, downloadedFileSize, startDownloadingTime) {
|
totalFileSize, downloadedFileSize, startDownloadingTime) {
|
||||||
downloadedFileSize += file.Size
|
downloadedFileSize += file.Size
|
||||||
downloadedFiles = append(downloadedFiles, file)
|
downloadedFiles = append(downloadedFiles, file)
|
||||||
file.RestoreMetadata(fullPath, nil, setOwner)
|
|
||||||
}
|
}
|
||||||
|
file.RestoreMetadata(fullPath, nil, setOwner)
|
||||||
}
|
}
|
||||||
|
|
||||||
if deleteMode && len(patterns) == 0 {
|
if deleteMode && len(patterns) == 0 {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func (entry *Entry) SetAttributesToFile(fullPath string) {
|
|||||||
newAttribute, found := entry.Attributes[name]
|
newAttribute, found := entry.Attributes[name]
|
||||||
if found {
|
if found {
|
||||||
oldAttribute, _ := xattr.Getxattr(fullPath, name)
|
oldAttribute, _ := xattr.Getxattr(fullPath, name)
|
||||||
if bytes.Equal(oldAttribute, newAttribute) {
|
if !bytes.Equal(oldAttribute, newAttribute) {
|
||||||
xattr.Setxattr(fullPath, name, newAttribute)
|
xattr.Setxattr(fullPath, name, newAttribute)
|
||||||
}
|
}
|
||||||
delete(entry.Attributes, name)
|
delete(entry.Attributes, name)
|
||||||
|
|||||||
Reference in New Issue
Block a user