Skip to content

Commit

Permalink
fix: also need to update ps_loc (#1792)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
a10y authored Jan 2, 2025
1 parent e9ae305 commit 51bd26b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vortex-file/src/read/builder/initial_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub async fn read_initial_bytes<R: VortexReadAt>(
)
}

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
Expand Down Expand Up @@ -149,6 +149,7 @@ pub async fn read_initial_bytes<R: VortexReadAt>(
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
Expand Down

0 comments on commit 51bd26b

Please sign in to comment.