Commit 1bf8e0e
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] #6001 parent c95c447 commit 1bf8e0e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments