Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pmtiles: always set leafStart when closing file [#794] #795

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

bdon
Copy link
Contributor

@bdon bdon commented Jan 30, 2025

  • the leafStart was only assigned in flushEntries, which never happens if there is only a root directory.
  • resulted in erroneous leafDirectoryOffset and tileDataLength in the pmtiles header.

Detect with pmtiles verify:

pmtiles verify main.pmtiles
2025/01/30 15:11:57 main.go:223: Failed to verify archive, Leaf directories offset=0 must not be 0
exit status 1

Fixes #794

* the leafStart was only assigned in flushEntries, which never happens if there is only a root directory.
* resulted in erroneous leafDirectoryOffset and tileDataLength in the pmtiles header.
@systemed systemed merged commit 0d01bc5 into systemed:master Jan 30, 2025
7 checks passed
@systemed
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

root-directory-only pmtiles archives have incorrect header offsets
2 participants