Skip to content

fix: strip trailing slash from argument before path operations (close…#535

Open
andy5995 wants to merge 1 commit intomasterfrom
fix-450-trailing-slash
Open

fix: strip trailing slash from argument before path operations (close…#535
andy5995 wants to merge 1 commit intomasterfrom
fix-450-trailing-slash

Conversation

@andy5995
Copy link
Copy Markdown
Member

…s #450)

A trailing slash on a symlink caused rename() to fail with ENOTDIR because
the kernel dereferenced the symlink. Strip any trailing slash from the argument early, before check_pathname_state, lstat, resolve_path, and rename, so "foo/" is treated identically to "foo".

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Fixes #450

@andy5995 andy5995 added this to the v0.10.0 milestone Apr 30, 2026
…#450)

A trailing slash on a symlink caused rename() to fail with ENOTDIR
because
the kernel dereferenced the symlink. Strip any trailing slash from the
argument early, before check_pathname_state, lstat, resolve_path, and
rename, so "foo/" is treated identically to "foo".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Fixes #450
@andy5995 andy5995 force-pushed the fix-450-trailing-slash branch from 7e2af0d to 6599694 Compare April 30, 2026 20:37
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.

Trailing slashes not being trimmed on symbolic links

1 participant