Skip to content

fix(s3): treat empty --prefix as "no prefix component" - #85

Merged
jasonwhite merged 1 commit into
jasonwhite:masterfrom
hauntedhost:fix/empty-prefix-leading-slash
Apr 25, 2026
Merged

jasonwhite merged 1 commit into
jasonwhite:masterfrom
hauntedhost:fix/empty-prefix-leading-slash

Conversation

@hauntedhost

@hauntedhost hauntedhost commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

Previously, --prefix="" (or RUDOLFS_S3_PREFIX="") produced S3 keys with a leading slash, e.g. /<namespace>/<oid>, manifesting as "/" in S3 listings.

This PR makes empty prefix mean "skip the prefix component entirely", so keys become <namespace>/<oid>.

Default behavior (--prefix=lfs) is unchanged, only the literal empty-string case is affected.

Previously, --prefix="" (or RUDOLFS_S3_PREFIX="") produced S3 keys
with a leading slash, e.g. /<namespace>/<oid>, manifesting as a
phantom empty-named "directory" in S3 listings.

Make empty prefix mean "skip the prefix component entirely", so keys
become <namespace>/<oid> directly. Default behavior (--prefix=lfs)
is unchanged; only the literal empty-string case is affected, and it
was malformed before.
@jasonwhite
jasonwhite merged commit 37fc077 into jasonwhite:master Apr 25, 2026
6 checks passed
@hauntedhost
hauntedhost deleted the fix/empty-prefix-leading-slash branch April 25, 2026 18:35
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.

2 participants