Skip to content

fix issue with FileSystem::glob handling of non-existent files#7516

Open
a10y wants to merge 1 commit into
developfrom
aduffy/glob-verify-exact-path
Open

fix issue with FileSystem::glob handling of non-existent files#7516
a10y wants to merge 1 commit into
developfrom
aduffy/glob-verify-exact-path

Conversation

@a10y
Copy link
Copy Markdown
Contributor

@a10y a10y commented Apr 17, 2026

Summary

Closes: #6599

When FileSystem::glob() is called without any glob patterns, it returns a file stream with either a single element or no elements, depending on if the file exists in the FS.

API Changes

None

Testing

3 unit tests:

  1. globbing single file
  2. Globbing non-existent file
  3. Globbing file where multiple have same prefix only returns stream for exact-match

Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y added the changelog/fix A bug fix label Apr 17, 2026
@a10y a10y requested a review from gatesn April 17, 2026 15:14
@a10y a10y enabled auto-merge (squash) April 17, 2026 15:14
@a10y a10y changed the title fix #6599 FileSystem::glob handles single-file patterns Apr 17, 2026
@a10y a10y changed the title FileSystem::glob handles single-file patterns fix issue with FileSystem::glob handling of non-existent files Apr 17, 2026
@a10y
Copy link
Copy Markdown
Contributor Author

a10y commented Apr 17, 2026

There's something weird here, since ObjectStore::list("x") doesn't return "x" if "x" is a file path. This probably needs to use head_object instead, and plumb that through FileSystem

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix stale This PR is stale and will be auto-closed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FileSystem::glob with non-glob should verify file exists

2 participants