Skip to content

Commit 3b7735c

Browse files
committed
update flag condition
1 parent d073157 commit 3b7735c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pbm/resync/rsync.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,19 +331,16 @@ func getAllRestoreMetaFromStorage(
331331
return nil, errors.Wrap(err, "get physical restores list from the storage")
332332
}
333333

334-
var targets []storage.FileInfo
335-
336-
if skipRestores && len(restoreMeta) > 0 {
334+
targets := restoreMeta
335+
if !includeRestores && len(restoreMeta) > 0 {
337336
l.Debug("only processing last restore")
338337
latest := restoreMeta[0]
339-
for _, f := range restoreMeta[1:] {
338+
for _, f := range restoreMeta {
340339
if f.Name > latest.Name {
341340
latest = f
342341
}
343342
}
344343
targets = []storage.FileInfo{latest}
345-
} else {
346-
targets = restoreMeta
347344
}
348345

349346
rv := make([]*restore.RestoreMeta, 0, len(targets))

0 commit comments

Comments
 (0)