meteor/meteor — pull request #303 by TomWij (2012-08-26 01:33:49+00:00)
Title: Proper use of path.join(..., ...) and path.sep to be more cross-platform.

This pull request features a lot of line changes to fix occurences where the `/` character was used explicitly, as well as to fix occurences of `../` and `./` to use `__dirname` instead *where possible*.

Node.js introduces `path.sep` in `0.8.x`, which allows us to replace the `/` used in matches; however

`/home/tomwij/Downloads/meteor/dev_bundle/bin/node: symbol lookup error: /home/tomwij/Downloads/meteor/dev_bundle/lib/node_modules/fibers/src/fibers.node: undefined symbol:
_ZNK2v85Value11IsUndefinedEv`

It appears Node.js `0.8.x` doesn't go together with Fibers, hence I need help for others to confirm if this is indeed a problem; we should then need to urgently report this to get a timely fix, else we can't bump across `0.8.x` in the near future, unless the fibers fix would be trivial.

---

The reason I am putting this pull request early is to let you know it is there and such that inspection can happen early, as I feel this is a large code change it shouldn't be pulled in right away, **but thorougly checked**.

One example thing I need to do is to check for each file that I have modified whether there is a `var path = require('path');` in place and that it is above any other references to `path`. Furthermore, `__dirname` can't be used in the Fibers context, so that needs to be removed from any `packages/` files. And a very last thing is that there were one or two occasions were I wasn't sure whether it was a path or not (eg. the `serve_root` variable), the solution for this last issue has two options:

1. Replace those instances back to `/`, but possible replaces need to be done when translating paths to URLs.

2. Translate all URLS to use `/` instead of `\` right before passing it on to functions that parse the URL.

Hopefully this will help us to get towards a more cross-platform Meteor, reaching to not only the main OSes but perhaps even beyond. Thank you in advance... :)