From dfa61132794762cad5574a686f6691fa67136d81 Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Thu, 31 Aug 2017 16:29:57 -0400 Subject: [PATCH] Keep and restore attributes when no patterns provided to the restore command --- src/duplicacy_snapshotmanager.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/duplicacy_snapshotmanager.go b/src/duplicacy_snapshotmanager.go index c2e62e2..16150ad 100644 --- a/src/duplicacy_snapshotmanager.go +++ b/src/duplicacy_snapshotmanager.go @@ -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)