File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -643,19 +643,19 @@ def unsparse(self):
643643 if chunk_header .chunk_type == 0xCAC2 :
644644 data = self ._read_data (chunk_data_size )
645645 len_data = sector_size << 9
646- out .write ( struct . pack ( "B" , 0 ) * len_data )
646+ out .truncate ( out . tell () + len_data )
647647 output_len += len (data )
648648 sector_base += sector_size
649649 else :
650650 if chunk_header .chunk_type == 0xCAC3 :
651651 data = self ._read_data (chunk_data_size )
652652 len_data = sector_size << 9
653- out .write ( struct . pack ( "B" , 0 ) * len_data )
653+ out .truncate ( out . tell () + len_data )
654654 output_len += len (data )
655655 sector_base += sector_size
656656 else :
657657 len_data = sector_size << 9
658- out .write ( struct . pack ( "B" , 0 ) * len_data )
658+ out .truncate ( out . tell () + len_data )
659659 sector_base += sector_size
660660 chunks -= 1
661661 return unsparse_file
You can’t perform that action at this time.
0 commit comments