Repository navigation
localstore: find files when the base path is . - #64
Merged
sduchesneau merged 1 commit intoNov 13, 2026
Merged
sduchesneau merged 1 commit into
sduchesneau merged 1 commit into
Conversation
With a base path of `.`, walk filtered on the `./` prefix, but
filepath.Walk(".") reports `file` and not `./file`, so every file was
skipped and Walk, WalkFrom and the listings returned nothing. Resolve the
base path to an absolute path when the store is created.
Fixes streamingfast/firehose-core#56 (`firecore tools check merged-blocks .`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sduchesneau
approved these changes
Nov 13, 2026
sduchesneau
pushed a commit
to streamingfast/firehose-core
that referenced
this pull request
Nov 13, 2026
Picks up streamingfast/dstore#64, so `firecore tools check merged-blocks .` reads the files of the current directory instead of reporting an empty range and "No hole found". Fixes #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes streamingfast/firehose-core#56.
Problem
A local store opened with the base path
.finds no files.firecore tools check merged-blocks .reports an empty range and "🆗 No hole found" on a store that does have files and holes. The same command run against the full path, or../merged-blocks, works.Cause:
walkfilters ons.basePath + "/", which is./for this store.filepath.Walk(".")reports0000000100.dbin.zst, not./0000000100.dbin.zst, so thestrings.HasPrefix(infoPath, fullPath)check skips every file.Walk,WalkFrom,ListFilesandWalkAttributesall return nothing.Change
newLocalStoreContextresolves the base path withfilepath.Absinstead offilepath.Clean.Absalso cleans the path, and it puts every relative base path in the form the walk already handles.BaseURL()andObjectURL()are unchanged, because they keep using the URL as given.ObjectPath()now returns an absolute path for stores opened with a relative base path.Tests
TestNewLocalStore_CurrentDirectory: chdirs into a temp dir and checksWalk,WalkFromandOpenObjecton a store opened at.. It fails before this change.go test ./...passes.tools check merged-blocks . -r 0:700on a store with a hole at 300–499. It now prints both ranges,❌ Range [#300, #499] (Missing, [300:500])and "🆘 Holes found!". Before, it printed✅ Range [#0, #0]and "🆗 No hole found".🤖 Generated with Claude Code