refactor: parametrize PrefixFilter VersionType check

refs #34
This commit is contained in:
Christian Schwarz
2017-11-12 23:02:23 +01:00
parent cef63ac176
commit 51af880701
5 changed files with 21 additions and 17 deletions

View File

@ -47,7 +47,7 @@ func (a *IntervalAutosnap) Run(ctx context.Context, didSnaps chan struct{}) {
l := a.log.WithField(logFSField, d.ToString())
fsvs, err := zfs.ZFSListFilesystemVersions(d, &PrefixSnapshotFilter{a.Prefix})
fsvs, err := zfs.ZFSListFilesystemVersions(d, NewTypedPrefixFilter(a.Prefix, zfs.Snapshot))
if err != nil {
l.WithError(err).Error("cannot list filesystem versions")
continue