diff options
author | Adam Luikart <me@adamluikart.com> | 2011-06-25 17:37:57 -0500 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-07-04 22:50:27 +0200 |
commit | 7f30f135438f45f62a373d551764f0e804ff62ed (patch) | |
tree | 940b6879abebc2cc4cced7405fd1ad7f3ff61133 /lib/path.js | |
parent | 04c916989291ccc28fb2a8230e4013f97cc9799d (diff) | |
download | android-node-v8-7f30f135438f45f62a373d551764f0e804ff62ed.tar.gz android-node-v8-7f30f135438f45f62a373d551764f0e804ff62ed.tar.bz2 android-node-v8-7f30f135438f45f62a373d551764f0e804ff62ed.zip |
Update POSIX splitPathRe to allow control chars. Fixes #1230.
Use [\s\S] instead of . to match any char, including newlines.
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 59fc5b3216..576b12f1e6 100644 --- a/lib/path.js +++ b/lib/path.js @@ -249,7 +249,7 @@ if (isWindows) { // Regex to split a filename into [*, dir, basename, ext] // posix version - var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; + var splitPathRe = /^([\s\S]+\/(?!$)|\/)?((?:[\s\S]+?)?(\.[^.]*)?)$/; // path.resolve([from ...], to) // posix version |