🐛 Normalize Windows symlink path separators#2861
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughOn Windows, symlink now normalizes forward slashes to backslashes for both target and link, resolves relative targets against the link's parent to determine directory-ness, and calls Windows symlink APIs using the normalized paths; Windows-only unit tests were added. ChangesWindows Symlink Path Normalization & Resolution
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces path normalization for Windows symlinks, ensuring forward slashes are converted to backslashes. The review feedback identifies an opportunity to optimize the normalize_windows_separators function by modifying the wide character vector in-place, thereby reducing unnecessary memory allocations.
4a6cb75 to
4b64354
Compare
98a5e44 to
3f6c01a
Compare
Windows CreateSymbolicLinkW requires native backslash separators. Normalize forward slashes in symlink targets and link paths before calling symlink_dir/symlink_file to prevent invalid symlink creation.
3f6c01a to
2520778
Compare
Windows CreateSymbolicLinkW requires native backslash separators. Normalize forward slashes in symlink targets and link paths before calling symlink_dir/symlink_file to prevent invalid symlink creation.
Summary by CodeRabbit
Bug Fixes
Tests