-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the `uv_fs_realpath()` binding (which calls the libc `realpath()` on UNIX and `GetFinalPathNameByHandle()` on Windows) available as the `fs.realpath.native()` and `fs.realpathSync.native()` functions. The binding was already available as `process.binding('fs').realpath` but was not exposed or tested - and partly broken as a result. Fixes: #8715 PR-URL: #15776 Refs: #7899 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
- Loading branch information
1 parent
2266caf
commit 8611e3b
Showing
4 changed files
with
110 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const fs = require('fs'); | ||
|
||
if (!common.isOSX) common.skip('MacOS-only test.'); | ||
|
||
assert.strictEqual(fs.realpathSync.native('/users'), '/Users'); | ||
fs.realpath.native('/users', common.mustCall((err, res) => { | ||
assert.ifError(err); | ||
assert.strictEqual(res, '/Users'); | ||
})); |
Oops, something went wrong.