File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,16 @@ impl<T: ISO9660Reader> ISOFile<T> {
3737 file : FileRef < T > ,
3838 ) -> Result < ISOFile < T > > {
3939 // Files (not directories) in ISO 9660 have a version number, which is
40- // provided at the end of the identifier, seperated by ';'
41- let error = ISOError :: InvalidFs ( "File indentifier missing ';'" ) ;
42- let idx = identifier. rfind ( ';' ) . ok_or ( error) ?;
43-
44- let version = u16:: from_str ( & identifier[ idx + 1 ..] ) ?;
45- identifier. truncate ( idx) ;
40+ // provided at the end of the identifier, seperated by ';'.
41+ // If not, assume 1.
42+ let version = match identifier. rfind ( ';' ) {
43+ Some ( idx) => {
44+ let version = u16:: from_str ( & identifier[ idx + 1 ..] ) ?;
45+ identifier. truncate ( idx) ;
46+ version
47+ } ,
48+ None => 1
49+ } ;
4650
4751 // Files without an extension have a '.' at the end
4852 if identifier. ends_with ( '.' ) {
You can’t perform that action at this time.
0 commit comments