isaacs
74c08403d8
lint
2013-02-22 16:30:27 -08:00
isaacs
089ec58613
path: Throw TypeError on non-string args to path.resolve
2013-02-21 15:18:44 -08:00
Arianit Uka
055110dab0
path: join throws TypeError on non-string args
...
lib/path.js:
- throws a TypeError on the filter if the argument is not a string.
test/simple/test-path.js:
- removed the test to check if non-string types are filtered.
- added a test to check if path.join throws TypeError on arguments that
are not strings.
2013-02-21 11:50:47 -08:00
isaacs
bbcb8b3ae0
path: Do not coerce paths to strings on Windows
...
Fix #4795
2013-02-20 14:04:30 -08:00
Bert Belder
6a91eab097
path: make basename and extname ignore trailing slashes
...
Fixes #4536
2013-01-11 18:50:09 +01:00
Bert Belder
7be27240b5
Revert "path: fix bugs related to paths with trailing slashes"
...
It only does the right thing on unix, and the implementation
isn't great either.
This reverts commit bb1c03989f
.
2013-01-11 16:19:21 +01:00
Andreas Madsen
bb1c03989f
path: fix bugs related to paths with trailing slashes
2013-01-10 17:58:37 -08:00
isaacs
0e95ea42ce
lint
...
introduced in 5b65638
.
2012-12-07 16:58:16 -08:00
Bert Belder
bc9388342f
windows: fix normalization of UNC paths
2012-11-21 01:21:25 +01:00
Paul Serby
41e53e5579
path: add platform specific path delimiter
...
Closes #3728
Closes #4071
2012-10-01 22:10:36 +02:00
isaacs
985e3a25cb
lint
2012-08-27 13:03:30 -07:00
Felix Böhm
d15bfc04cd
path: small speed improvements
2012-08-10 12:55:49 +02:00
isaacs
5b39929d47
Add --no-deprecation and --trace-deprecation flags
2012-06-21 12:05:33 -07:00
isaacs
5164ae3838
Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
...
Conflicts:
ChangeLog
deps/uv/include/uv-private/uv-unix.h
deps/uv/src/unix/core.c
deps/uv/src/unix/sunos.c
deps/v8/src/runtime.cc
doc/api/crypto.markdown
lib/http.js
src/node_version.h
test/gc/test-http-client-timeout.js
wscript
2012-05-15 11:37:34 -07:00
Bert Belder
d91004a73d
Windows: make path.normalize convert all slashes to backslashes
...
Closes #3066
2012-05-13 03:18:09 +02:00
Yi, EungJun
4bd54dad33
path: add path.sep to get the path separator.
2012-05-01 15:19:37 +02:00
isaacs
0cdf85e28d
Lint all the JavaScripts.
2012-02-18 15:34:57 -08:00
isaacs
31721da4b1
Merge remote-tracking branch 'ry/v0.6' into v0.6-merge
...
Conflicts:
AUTHORS
ChangeLog
Makefile
doc/about/index.html
doc/api/tls.markdown
doc/community/index.html
doc/index.html
doc/logos/index.html
doc/template.html
lib/http.js
lib/tls.js
src/node_version.h
src/platform_win32.cc
test/simple/test-tls-connect-given-socket.js
2012-02-18 09:46:58 -08:00
Bert Belder
d91bc7cb09
Windows: get rid of process._cwdForDrive()
2012-02-16 00:10:51 +01:00
isaacs
116835561d
Merge remote-tracking branch 'ry/v0.6'
...
Conflicts:
ChangeLog
deps/v8/src/version.cc
deps/v8/tools/gyp/v8.gyp
doc/about/index.html
doc/community/index.html
doc/index.html
doc/logos/index.html
doc/template.html
lib/path.js
lib/querystring.js
src/node_version.h
2012-02-06 15:43:21 -08:00
Bert Belder
e5ea6ad0f0
_makeLong shouldn't turn the empty string into \\?\C:\
2012-02-02 17:14:03 +01:00
Bert Belder
a661830569
Run path.exists paths through _makeLong
2012-02-02 17:14:01 +01:00
Brandon Benvie
5403a8ce4c
core: add NativeModule.prototype.deprecate
...
Formalize and cleanup handling of deprecated core methods.
2012-01-30 00:27:07 +01:00
Fedor Indutny
667aae596c
Merge branch 'v0.6'
...
Conflicts:
ChangeLog
doc/template.html
lib/cluster.js
lib/http.js
lib/tls.js
src/node.h
src/node_version.h
test/simple/test-cluster-kill-workers.js
2012-01-24 00:30:28 +06:00
Maciej Małecki
e10ed097cb
path fs: move path.exists*
to fs.exists*
...
`path.exists*` functions show a deprecation warning and call functions
from `fs`. They should be removed later.
test: fix references to `path.exists*` in tests
test fs: add test for `fs.exists` and `fs.existsSync`
doc: reflect moving `path.exists*` to `fs`
2012-01-21 14:37:14 +01:00
Bert Belder
d489a01f81
Make path.extname do the right thing when the last path component is . or ..
...
Closes GH-2526
2012-01-18 15:21:58 +01:00
Bert Belder
f4e34f1b76
Remove unnecessary statement
2011-12-20 17:15:22 +00:00
Author: Igor Zinkovsky
1f16a7b6e5
Enable long paths on windows
2011-11-25 09:35:52 +01:00
Bert Belder
86fba381fd
Windows: correctly resolve drive-relative paths
2011-11-24 02:38:34 +01:00
Colton Baker
87286cc737
Fixed a lot of jslint errors.
...
Fixes #1831
2011-10-05 18:51:06 -07:00
Bert Belder
8153a21613
Improve path parsing on windows
...
Closes #650
2011-09-06 04:47:36 +02:00
Thomas Shinnick
a5d90c435c
path.js: correct three harmless .length typos
...
lib/path.js routines normalizeArray() and resolve() have for loops that
count down from end of an array. The loop indexes are initialized using
"array.length" rather than "array.length-1". The initial array element
accessed is always beyond the end of array and the value is 'undefined'.
Strangely, code exists that acts to ignore undefined values so that the
typos are unnoticeable.
Existing tests emit no errors either before or after changing to "length-1".
Tests _do_ start failing at "length-2". (Actually it is node that starts
to fail at "length-2" - that's a valid enough test...)
2011-08-14 04:10:42 +02:00
Robert Mustacchi
de0b8d601c
jslint cleanup: path.js, readline.js, repl.js, tls.js, tty_win32.js, url.js
2011-07-29 11:58:02 -07:00
Adam Luikart
7f30f13543
Update POSIX splitPathRe to allow control chars. Fixes #1230 .
...
Use [\s\S] instead of . to match any char, including newlines.
2011-07-04 22:50:27 +02:00
Ryan Dahl
247d880113
Merge branch 'v0.4'
...
Conflicts:
src/node_version.h
2011-03-14 17:45:15 -07:00
Ryan Dahl
55048cdf79
Update copyright headers
2011-03-14 17:37:05 -07:00
Tony Huang
502900c0bc
add path.relative
2011-03-08 11:03:21 -08:00
Bert Belder
38d8cd60ea
Don't make unnecessary getcwd calls from path.resolve
2011-02-08 14:30:24 -08:00
Ryan Dahl
5a05992155
Lint
2011-01-06 16:06:27 -08:00
Bert Belder
7c731ec9dd
Path.resolve, path module windows compatibility
...
Removes path.normalizeArray() and path.split()
2011-01-06 15:36:25 -08:00
Bert Belder
9ddfcfecca
Remove keepBlanks flag from path functions
2011-01-05 11:17:38 -08:00
Bert Belder
9be07f7fe1
_Partial_ fix for backslash path separator support in path.js
...
Needs review & tests
2010-12-20 23:51:27 +01:00
Ryan Dahl
e232f6e735
more lint
2010-12-01 20:28:28 -08:00
Ryan Dahl
6063ea62df
fix style in path.js
2010-11-21 14:15:46 -08:00
isaacs
9996b459e1
Implement new path.join behavior
...
1. Express desired path.join behavior in tests.
2. Update fs.realpath to reflect new path.join behavior
3. Update url.resolve() to use new path.join behavior.
2010-11-14 22:49:26 -08:00
Micheil Smith
d2c47b4f87
Removed deprecated methods from lib/path.js
2010-10-11 16:21:21 -07:00
Joshaven Potter
3d4e4d8909
syntax fixes to pass jslint
2010-10-06 20:40:57 -07:00
isaacs
65037eeb32
Don't let path.normalize get above the root.
...
Any path.join or path.normalize that starts with a / will not go "above" that after normalization. This is important because /../foo is almost *always* some sort of error, and doesn't match the corollary in sh: `cd $p; pwd`
At the worse, this can be a vector for exploits, since a static file server might do path.join(docroot, path.normalize("/"+req)) to get the file. If the normalized request path could be something like "/../../../etc/passwd" then bad things could happen.
2010-08-01 20:20:17 -07:00
isaacs
f0f247d7e5
Fix dirname so that dirname('/a/b/') -> '/a', like sh's does.
...
Before there was this comment:
Can't strip trailing slashes since module.js incorrectly
thinks dirname('/a/b/') should yield '/a/b' instead of '/a'.
But now, such thinking is corrected.
2010-07-23 09:08:49 -07:00
Micheil Smith
b05daaaf69
Adding path.existsSync (with tests.)
2010-06-16 10:26:11 -07:00