Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1303.
Preserve final symlinks in rename/rm, reject self-descendant directory renames before changing entries, reject directory hard links, protect existing files and dangling links during recursive mkdir, and report symlink target UTF-8 size with 0777 permissions. Rename also checks destination types and nonempty directories before mutation and keeps same-inode renames unchanged. Adds 42 regression/guard cases and updates three dependent expectations. Recursive mkdir preserves Node's sync/callback/promise errno distinction for dangling intermediate symlinks.
The reported dangling-symlink
cpSynccase is unchanged: native Linux Node 22.23.1 and 26.13.1 also returnENOENT, including the checked symlink options. This addresses the six demonstrated mismatches, without duplicating #1302's separate inode-release work.Validation with locked Yarn 4.12.0:
yarn build,yarn typecheck,yarn prettier:check, andyarn testpass (101 suites, 1662 tests passed, 17 skipped, 14 snapshots).Native parity probes cover Linux/POSIX behavior; native Windows symlink setup returned
EPERM. The existing direct destination-parent symlink limitation remains: a rename into/alias/namecan reportENOTDIRwhen/aliasis a directory symlink. Implementation and tests were prepared with AI assistance and are submitted for maintainer review.