Fix a bug: data track/sector entries should only be skipped if track == 0, not sector == 0.

This commit is contained in:
kris 2017-04-16 00:31:07 +01:00
parent df17eac3df
commit f6581c9078
1 changed files with 3 additions and 1 deletions

View File

@ -110,8 +110,10 @@ class FileMetadataSector(disklib.Sector):
(t, s) = ds.unpack(
'uint:8, uint:8'
)
if t and s:
if t:
# This may not be the end of the file, it can be sparse.
data_track_sectors.append((t, s))
# TODO: should I append a hole here if this is not the last entry?
offset += 16
self.next_track = next_track