mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-15 15:53:26 +00:00
Don't show snapshots whose tags don't match the given one
This commit is contained in:
@@ -689,6 +689,9 @@ func (manager *SnapshotManager) ListSnapshots(snapshotID string, revisionsToList
|
|||||||
for _, revision := range revisions {
|
for _, revision := range revisions {
|
||||||
|
|
||||||
snapshot := manager.DownloadSnapshot(snapshotID, revision)
|
snapshot := manager.DownloadSnapshot(snapshotID, revision)
|
||||||
|
if tag != "" && snapshot.Tag != tag {
|
||||||
|
continue
|
||||||
|
}
|
||||||
creationTime := time.Unix(snapshot.StartTime, 0).Format("2006-01-02 15:04")
|
creationTime := time.Unix(snapshot.StartTime, 0).Format("2006-01-02 15:04")
|
||||||
tagWithSpace := ""
|
tagWithSpace := ""
|
||||||
if len(snapshot.Tag) > 0 {
|
if len(snapshot.Tag) > 0 {
|
||||||
@@ -697,10 +700,6 @@ func (manager *SnapshotManager) ListSnapshots(snapshotID string, revisionsToList
|
|||||||
LOG_INFO("SNAPSHOT_INFO", "Snapshot %s revision %d created at %s %s%s",
|
LOG_INFO("SNAPSHOT_INFO", "Snapshot %s revision %d created at %s %s%s",
|
||||||
snapshotID, revision, creationTime, tagWithSpace, snapshot.Options)
|
snapshotID, revision, creationTime, tagWithSpace, snapshot.Options)
|
||||||
|
|
||||||
if tag != "" && snapshot.Tag != tag {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if showFiles {
|
if showFiles {
|
||||||
manager.DownloadSnapshotFileSequence(snapshot, nil, false)
|
manager.DownloadSnapshotFileSequence(snapshot, nil, false)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user