Skip to content

fix(storage): preserve glob result URI scheme#2804

Merged
ZaynJarvis merged 1 commit into
mainfrom
fix/glob-root-uri
Jun 24, 2026
Merged

fix(storage): preserve glob result URI scheme#2804
ZaynJarvis merged 1 commit into
mainfrom
fix/glob-root-uri

Conversation

@qin-ctx

@qin-ctx qin-ctx commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix glob result URI formatting when the query scope is the root viking:// URI. The implementation now reuses the URI already produced by tree() instead of rebuilding it from uri.rstrip("/") and rel_path.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Reuse entry["uri"] from tree() for glob matches.
  • Remove manual base_uri = uri.rstrip("/") URI reconstruction.
  • Preserve existing canonical and legacy alias URI handling for glob results.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Not run; change is a minimal URI formatting fix and no test was requested.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

This fixes the viking:/... output caused by stripping the trailing slashes from the root viking:// URI before concatenating a relative path.

Use tree entry URIs for glob matches so root-scope glob results keep the viking:// scheme and share the existing canonical URI handling.
@ZaynJarvis ZaynJarvis merged commit 686a8a5 into main Jun 24, 2026
3 checks passed
@ZaynJarvis ZaynJarvis deleted the fix/glob-root-uri branch June 24, 2026 06:42
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.

3 participants