diff options
author | Herman Lee <threeday0905@gmail.com> | 2014-08-04 22:18:54 +0800 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-08-04 13:39:12 -0700 |
commit | 20229d6896ce4b802a0789b1d2643dcac55bebb9 (patch) | |
tree | 7d3dc644d0b786ef9844bd740d08f6f8ef5f0002 /lib/path.js | |
parent | 962e651476ce2035ce6e15eff5abd0f9c54e039c (diff) | |
download | android-node-v8-20229d6896ce4b802a0789b1d2643dcac55bebb9.tar.gz android-node-v8-20229d6896ce4b802a0789b1d2643dcac55bebb9.tar.bz2 android-node-v8-20229d6896ce4b802a0789b1d2643dcac55bebb9.zip |
path: isAbsolute() should always return boolean
On Windows, path.isAbsolute() returns an empty string on failed cases.
This forces the return value to always be boolean.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/path.js')
-rw-r--r-- | lib/path.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/path.js b/lib/path.js index 04187aaf2f..44ef0d68e2 100644 --- a/lib/path.js +++ b/lib/path.js @@ -206,7 +206,7 @@ if (isWindows) { exports.isAbsolute = function(path) { var result = splitDeviceRe.exec(path), device = result[1] || '', - isUnc = device && device.charAt(1) !== ':'; + isUnc = !!device && device.charAt(1) !== ':'; // UNC paths are always absolute return !!result[2] || isUnc; }; |