Bug: fetch command does not URL-encode file paths, breaking files with special characters #13
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
internal/cli/fetch.go, the file download URL is constructed via simple string concatenation:File paths containing spaces,
#,?,%, or other URL-special characters will produce malformed URLs, causing downloads to fail or fetch the wrong resource.For example, a manifest entry with path
my file.txtwould produce URLhttps://example.com/dir/my file.txt(unencoded space) instead ofhttps://example.com/dir/my%20file.txt.The codebase already has
BaseURL.JoinPath()inmfer/url.gothat properly encodes paths, but it is not used in the fetch command.Fix: Use proper URL path encoding when constructing file download URLs. Could use the existing
BaseURL.JoinPath()orurl.PathEscape()on individual path segments.