Skip to content

fix(join)!: preserve normalized unc paths - #196

Merged
pi0 merged 2 commits into
mainfrom
fix/join-unc
Jan 3, 2025
Merged

pi0 merged 2 commits into
mainfrom
fix/join-unc

Conversation

@pi0

@pi0 pi0 commented Jan 3, 2025

Copy link
Copy Markdown
Member

resolves #178 (#178 (comment))

Even though normalize is UNC aware, join utility blindly strips the leading UNC indicator with a final replacement.

This PR changes join implementation to avoid global regex (normalize finally takes care of proper normalization).

Note: While all existing tests pass, this is a potential behavior change

Note: This PR does not add URL compatibility to path utils as it needs changes to more utils and it is out of scope / non goal.

@pi0
pi0 requested a review from danielroe January 3, 2025 13:24
@pi0

pi0 commented Jan 3, 2025

Copy link
Copy Markdown
Member Author

@danielroe do you mind taking a look on this? πŸ™πŸΌ

@danielroe

danielroe commented Jan 3, 2025 •

Copy link
Copy Markdown
Member

not at all!

will have a look when I'm back at my computer (I've been travelling today)

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good change to me πŸ‘Œ

@pi0
pi0 merged commit b91e344 into main Jan 3, 2025
@pi0
pi0 deleted the fix/join-unc branch January 3, 2025 23:59
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.

path.join should handle protocol with double slashes

2 participants