Skip to content

Commit 1bf8e0e

Browse files
committed
Use the absolute path instead of a relative path.
The latest implementation of the path.relative function of node v6 seems to be broken when either of the "from" or "to" paths are in a network resource of windows, removing the leading backslashes "\\" and returning a wrong path [0]. The new approach employs the path.resolve function that returns the absolute path to the nan headers and seems to work fine in the case of node v6 running in a windows box. Tests: * Windows 10 with node 4.3.0: c:\>node -e "console.log(require('path').relative('.','\\\\VBOXSRV\\vagrant'))" returns: \\VBOXSRV\vagrant\ * Windows 10 with node 6.5.0: c:\>node -e "console.log(require('path').relative('.','\\\\VBOXSRV\\vagrant'))" returns: VBOXSRV\vagrant\ [0] #600
1 parent c95c447 commit 1bf8e0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include_dirs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
console.log(require('path').relative('.', __dirname));
1+
console.log(require('path').resolve(__dirname));

0 commit comments

Comments
 (0)