ext2: Ignore physical 0 pointers in ext2 block map
Pointers can be 0 in sparse files. So far we actually followed them,
reading block 0 (which happened to be all 00, so we also returned
0 in the end).
diff --git a/src/filo-fs-ext2.adb b/src/filo-fs-ext2.adb
index db1c1a3..51f872b 100644
--- a/src/filo-fs-ext2.adb
+++ b/src/filo-fs-ext2.adb
@@ -227,6 +227,12 @@
is
Cache_Start, Cache_End : Max_Block_Index;
begin
+ if Indirect_Block_Phys = 0 then
+ Next_Physical := 0;
+ Success := True;
+ return;
+ end if;
+
Cache_FSBlock
(Static => Static,
Cache => State.Cache,