From 51bd26bad0a42082d378522c5dac792243ef73a5 Mon Sep 17 00:00:00 2001 From: Andrew Duffy Date: Thu, 2 Jan 2025 16:30:09 -0500 Subject: [PATCH] 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. --- vortex-file/src/read/builder/initial_read.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vortex-file/src/read/builder/initial_read.rs b/vortex-file/src/read/builder/initial_read.rs index 321c63a71..4d6ebe11a 100644 --- a/vortex-file/src/read/builder/initial_read.rs +++ b/vortex-file/src/read/builder/initial_read.rs @@ -107,7 +107,7 @@ pub async fn read_initial_bytes( ) } - let ps_loc = eof_loc - ps_size; + let mut ps_loc = eof_loc - ps_size; let mut fb_postscript_byte_range = ps_loc..eof_loc; // we validate the footer here @@ -149,6 +149,7 @@ pub async fn read_initial_bytes( initial_read_offset = schema_offset; fb_postscript_byte_range.start += prefix_bytes; fb_postscript_byte_range.end += prefix_bytes; + ps_loc += prefix_bytes; } // validate the schema and layout