path.normalize() and UNC Windows names #3066

Closed
gagle opened this Issue Apr 6, 2012 · 1 comment

Comments

Projects
None yet
2 participants

gagle commented Apr 6, 2012

UNC

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:

\\ComputerName\SharedFolder\Resource

node v0.6.14
windows 7 x64

code:

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

Member

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
d91004a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment