Fix dataset to have to correct type

The parent type was used before if the dataset was opened via
openChildren().
This commit is contained in:
Didier Roche 2020-04-06 15:58:23 +02:00 committed by Faruk Kasumovic
parent a91df3a028
commit ee9aac43ac
1 changed files with 1 additions and 1 deletions

2
zfs.go
View File

@ -59,7 +59,7 @@ func (d *Dataset) openChildren() (err error) {
list := C.dataset_list_children(d.list) list := C.dataset_list_children(d.list)
for list != nil { for list != nil {
dataset := Dataset{list: list} dataset := Dataset{list: list}
dataset.Type = DatasetType(C.dataset_type(d.list)) dataset.Type = DatasetType(C.dataset_type(list))
dataset.Properties = make(map[Prop]Property) dataset.Properties = make(map[Prop]Property)
err = dataset.ReloadProperties() err = dataset.ReloadProperties()
if err != nil { if err != nil {