Skip to content

Fix file names for nested relative BasePathFs - #658

Open
oodadoudou wants to merge 1 commit into
spf13:masterfrom
oodadoudou:codex/fix-nested-basepath-name
Open

Fix file names for nested relative BasePathFs#658
oodadoudou wants to merge 1 commit into
spf13:masterfrom
oodadoudou:codex/fix-nested-basepath-name

Conversation

@oodadoudou

Copy link
Copy Markdown

Nesting BasePathFs with a relative base leaves that base in File.Name(). Passing the name back to Chmod or Remove then prepends the base again and fails with a missing-file error.

Match the relative base against the rooted name returned by the outer wrapper. The regression reuses a temporary file's name on both OsFs and MemMapFs, covering relative and absolute bases, trailing separators, and a . base with a hidden directory. The relative-base cases fail before the fix.

Fixes #428

@CLAassistant

CLAassistant commented Sep 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

BasePathFs wrongly trims path prefix.

2 participants