Skip to content

Incorrect Reported Expected Values #11

@tparkerd

Description

@tparkerd

The reported expected file sizes is incorrect. It reports double the actual size instead of double the minimum size (uint8). The check for filesize < minimum_size should be checking for its double because it should be assuming uint16 instead of the uint8 that's stored in minimize_size.

if file_size < minimum_size:
logging.warning(f"Detected possible data corruption. File is smaller than expected '{fp}'. Expected at <{file_size * 2}> bytes but found <{file_size}> bytes. Defaulting to unsigned 16-bit.")
return 'uint16'
else:
logging.warning(f"Unable to determine bit-depth of volume '{fp}'. Expected at <{file_size * 2}> bytes but found <{file_size}> bytes. Defaulting to unsigned 16-bit.")

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions