nicholasbishop / ext4-view-rs

Rust library for reading ext2/ext4 filesystems
https://crates.io/crates/ext4-view
Apache License 2.0
8 stars 2 forks source link

Fix reading ext2 files with holes #251

Closed nicholasbishop closed 1 month ago

nicholasbishop commented 1 month ago

The block map may contain zeros. Such blocks should be treated as holes rather than actually reading the zero block.

Implement a simple fix in read_inode_file, and add a test.

See https://github.com/nicholasbishop/ext4-view-rs/issues/249 for a possible better fix that will require some refactoring.