Open cossssmin opened 2 months ago
I encountered a similar case with UNC paths, where it seems like the deduplication of forward slashes also break UNC paths in a similar way. It works the first time, but after the leading slashes have been normalized, consequent calls to join replace them with a single slash.
const initialPath = '\\\\uncpath\\share';
const normalizedPath = pe.join(initialPath, 'subfolder'); // //uncpath/share/subfolder
const mangledPath = pe.join(normalizedPath, 'file.txt'); // /uncpath/share/subfolder/file.txt
Environment
pathe v1.1.2
Node.js v20.10.0, Windows 11
Reproduction
Describe the bug
When using
join
with a URL, the double//
is reduced to a single/
:Additional context
No response
Logs
No response