path.normalize() and UNC Windows names #3066

gagle opened this Issue Apr 6, 2012 · 1 comment


None yet
2 participants

gagle commented Apr 6, 2012


The Microsoft Windows UNC, short for Universal Naming Convention or Uniform Naming Convention, specifies a common syntax to describe the location of a network resource, such as a shared file, directory, or printer. The UNC syntax for Windows systems has the generic form:


node v0.6.14
windows 7 x64


console.log (require ("path").normalize ("//GLADOS/4. Compartidos"));

The path points to a local folder:
D:\4. Compartidos

Expected result:
\\GLADOS\4. Compartidos

Real result:
//GLADOS/4. Compartidos\

This path does not generate any error while using the functions available in the File System module, but as the normalize() documentation says, in Windows, the slashes are converted to backslashes:

On windows backslashes are used.

but as you can see above, when using a shared recource path, slashes are used.

piscisaureus was assigned Apr 6, 2012


piscisaureus commented May 13, 2012

Fixed in a475e62

@ssuda ssuda pushed a commit to ssuda/node that referenced this issue May 13, 2012

@piscisaureus piscisaureus Windows: make path.normalize convert all slashes to backslashes
Closes #3066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment