Commit Graph

40 Commits (252f034b30b3bf9b0c38d683725868d899209870)

Author SHA1 Message Date
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
Aapo Laitinen c4876d01a1 Change the behavior of path.extname
Make path.extname return an empty string also if:
- The last dot is not in the last path component
- The last dot starts the last path component
2010-05-24 09:56:28 -07:00
rentzsch 36a45c4e0d FIX path.dirname('/tmp') => '/'.
Previously path.dirname('/tmp') incorrectly returned '.'.

Unfortunately module.js incorrectly thinks dirname('/a/b/') should
yield '/a/b', so I can't strip trailing slashes yet. Once module.js
is fixed, then the commented-out code should be activated and a test
written for it.
2010-05-20 10:16:09 -07:00
isaacs e0061a511d refactor path module to lib/path.js 2010-04-21 11:38:51 -07:00