Skip to content

Commit 51bd26b

Browse files
authored
fix: also need to update ps_loc (#1792)
Follow up to #1787, my unit test didn't fully capture the issue from the ticket. I've verified that after this change, I can successfully load the test file from the ticket using PyVortex.
1 parent e9ae305 commit 51bd26b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vortex-file/src/read/builder/initial_read.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub async fn read_initial_bytes<R: VortexReadAt>(
107107
)
108108
}
109109

110-
let ps_loc = eof_loc - ps_size;
110+
let mut ps_loc = eof_loc - ps_size;
111111
let mut fb_postscript_byte_range = ps_loc..eof_loc;
112112

113113
// we validate the footer here
@@ -149,6 +149,7 @@ pub async fn read_initial_bytes<R: VortexReadAt>(
149149
initial_read_offset = schema_offset;
150150
fb_postscript_byte_range.start += prefix_bytes;
151151
fb_postscript_byte_range.end += prefix_bytes;
152+
ps_loc += prefix_bytes;
152153
}
153154

154155
// validate the schema and layout

0 commit comments

Comments
 (0)