No need to explicitly add a zero dirent

This commit is contained in:
Juhani Krekelä 2023-03-27 15:18:04 +03:00
parent d1d9e86181
commit 9c61ea03ca
1 changed files with 3 additions and 3 deletions

View File

@ -44,9 +44,9 @@ for file_path in files_paths:
dirent = bytes([sectors & 0xff, sectors >> 8]) + file_name dirent = bytes([sectors & 0xff, sectors >> 8]) + file_name
extend_padded(directory, dirent_bytes, dirent) extend_padded(directory, dirent_bytes, dirent)
# Add a zero dirent to mark the end of the directory ## Add a zero dirent to mark the end of the directory
# (and the start of the consulate) ## (and the start of the consulate)
directory.extend(bytes(dirent_bytes)) #directory.extend(bytes(dirent_bytes))
assert len(directory) <= sector_bytes assert len(directory) <= sector_bytes