I noticed a bug introduced in 3b8e47755a16c72d7b3509685a89c834c42a9342
whereby require("../foo") fails to work. The problem is that paths
like "foo/bar/../baz" get turned into "foobaz" instead of "foo/baz".
My fix is here: http://github.com/jasondavies/node/commit/79efd868c460df001b2602e133e6f3f57c337356
If someone can take a look and let me know if it's kosher, that would
be useful.
Thanks,
Jason
Thanks for posting that fix, however, to paraphrase Ryan, bugs will be fixed quicker during his holidays if you write up a simple test case using /tests/mjsunit/.
Also, open up a ticket over at http://github.com/ry/node/issues
- Micheil.
> --
>
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
I just combed through this, adding some tests and making them pass,
including a more thorough fix that doesn't rely on regexps for this.
Fixed now on my master (isaacs/node), or you can apply the patch
yourself if you prefer:
http://groups.google.com/group/nodejs/browse_thread/thread/1aa0146b92582679#msg_9822c03998cb4064
http://gist.github.com/260278
--i
On Dec 19, 3:54 am, Micheil Smith <mich...@brandedcode.com> wrote:
> Hi Jason,
>
> Thanks for posting that fix, however, to paraphrase Ryan, bugs will be fixed quicker during his holidays if you write up a simple test case using /tests/mjsunit/.
>
> Also, open up a ticket over athttp://github.com/ry/node/issues
>
> - Micheil.
>
> On 19/12/2009, at 10:42 PM, Jason Davies wrote:
>
> > Hi all,
>
> > I noticed a bug introduced in 3b8e47755a16c72d7b3509685a89c834c42a9342
> > whereby require("../foo") fails to work. The problem is that paths
> > like "foo/bar/../baz" get turned into "foobaz" instead of "foo/baz".
>
> > My fix is here:http://github.com/jasondavies/node/commit/79efd868c460df001b2602e133e...
I just applied the patch locally and all tests are passing for me
again. Looks good otherwise as well.
--fg
On Dec 20, 2:49 am, "Isaac Z. Schlueter" <i...@foohack.com> wrote:
> Jason,
>
> I just combed through this, adding some tests and making them pass,
> including a more thorough fix that doesn't rely on regexps for this.
>
> Fixed now on my master (isaacs/node), or you can apply the patch
> yourself if you prefer:
>
--
Jason Davies
On Dec 20, 1:49 am, "Isaac Z. Schlueter" <i...@foohack.com> wrote:
> Jason,
>
> I just combed through this, adding some tests and making them pass,
> including a more thorough fix that doesn't rely on regexps for this.
>
> Fixed now on my master (isaacs/node), or you can apply the patch
> yourself if you prefer:
>