Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information