Skip to content

Commit 830ca1a

Browse files
committed
Support ISO version 2 reading
SVDs may have version greater than 1. For now let's check PVD version only. closes #290
1 parent 60c9452 commit 830ca1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

filesystem/iso9660/volume_descriptor.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ func volumeDescriptorFromBytes(b []byte) (volumeDescriptor, error) {
184184
}
185185
// validate the version
186186
version := b[6]
187-
if version != isoVersion {
188-
return nil, fmt.Errorf("mismatched ISO version in Volume Descriptor. Found %x expected %x", version, isoVersion)
187+
if volumeDescriptorType(b[0]) == volumeDescriptorPrimary && version != isoVersion {
188+
return nil, fmt.Errorf("mismatched ISO version in Primary Volume Descriptor. Found %x expected %x", version, isoVersion)
189189
}
190190
// get the type and data - later we will be more intelligent about this and read actual primary volume info
191191
vdType := volumeDescriptorType(b[0])

0 commit comments

Comments
 (0)