diff --git a/zpool/pool.go b/zpool/pool.go index 9717108..33eedd8 100644 --- a/zpool/pool.go +++ b/zpool/pool.go @@ -20,7 +20,7 @@ func OpenPool(name string) (p Pool) { propName := propLine[1] prop := zfs.Property{ - Value: propLine[2], + Value: propLine[2], Source: propLine[3], } p.Properties[propName] = prop @@ -36,8 +36,10 @@ func OpenPool(name string) (p Pool) { matches := slash.FindAllStringIndex(child, -1) //zfs command outputs all Children But that is a hassle to parse so ignore children of children here //TODO Figure out if I want to switch this to nonrecursive. and if So How - if !(len(matches) > 1 ) { - p.Datasets = append(p.Datasets, zfs.OpenDataset(child)) + if !(len(matches) > 1) { + if dset, err := zfs.OpenDataset(child); err == nil { + p.Datasets = append(p.Datasets, *dset) + } } } }