GeezerVison is showing github.com — path: fix toNamespacedPath on Windows · nodejs/node@609d90b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/path.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -647,7 +647,7 @@ const win32 = { |
647 | 647 | return `\\\\?\\${resolvedPath}`; |
648 | 648 | } |
649 | 649 |
|
650 | | - return path; |
| 650 | + return resolvedPath; |
651 | 651 | }, |
652 | 652 |
|
653 | 653 | /** |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-path-makelong.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -79,7 +79,8 @@ assert.strictEqual(path.win32.toNamespacedPath('\\\\foo\\bar'), |
79 | 79 | '\\\\?\\UNC\\foo\\bar\\'); |
80 | 80 | assert.strictEqual(path.win32.toNamespacedPath('//foo//bar'), |
81 | 81 | '\\\\?\\UNC\\foo\\bar\\'); |
82 | | -assert.strictEqual(path.win32.toNamespacedPath('\\\\?\\foo'), '\\\\?\\foo'); |
| 82 | +assert.strictEqual(path.win32.toNamespacedPath('\\\\?\\foo'), '\\\\?\\foo\\'); |
| 83 | +assert.strictEqual(path.win32.toNamespacedPath('\\\\?\\c:\\Windows/System'), '\\\\?\\c:\\Windows\\System'); |
83 | 84 | assert.strictEqual(path.win32.toNamespacedPath(null), null); |
84 | 85 | assert.strictEqual(path.win32.toNamespacedPath(true), true); |
85 | 86 | assert.strictEqual(path.win32.toNamespacedPath(1), 1); |
|