Keep and restore attributes when no patterns provided to the restore command

This commit is contained in:
Gilbert Chen
2017-08-31 16:29:57 -04:00
parent d7fdb5fe7f
commit dfa6113279

View File

@@ -303,12 +303,8 @@ func (manager *SnapshotManager) DownloadSnapshotFileSequence(snapshot *Snapshot,
return false
}
if patterns == nil {
if len(patterns) != 0 && !MatchPath(entry.Path, patterns) {
entry.Attributes = nil
} else if len(patterns) != 0 {
if !MatchPath(entry.Path, patterns) {
entry.Attributes = nil
}
}
files = append(files, &entry)