load volume info from .vif file, use superblock as a backup

This commit is contained in:
Chris Lu
2019-12-28 12:28:58 -08:00
parent b7bc08cf52
commit c06f7eb48a
9 changed files with 292 additions and 251 deletions

View File

@@ -70,6 +70,9 @@ func (v *Volume) FileName() (fileName string) {
}
func (v *Volume) Version() needle.Version {
if v.volumeInfo.Version != 0 {
v.SuperBlock.Version = needle.Version(v.volumeInfo.Version)
}
return v.SuperBlock.Version
}