felixge/node-formidable — pull request #156 by bengourley (2012-07-06 18:35:16+00:00)
Title: Look for more potential tmp dir locations

On some systems a non-temporary directory was being used (e.g. on my mac, `/tmp` was being used, when actual temporary directories are at `/var/folders/...`). This was missed because the environment variable on a Mac is called `TMPDIR`, and currently only `TMP` is checked.

I have added more paths/environment variables to the lookup path to make it more likely that a real temporary director is used, as opposed to `/tmp` or `cwd`:

- `process.env.TMPDIR` (mac)
- `process.env.TEMP` (exists on Windows and whatever platform Nodejitsu uses)

I've also updated the tests so that does `isDirectory()` on the path rather than checking for `=== '/tmp`

Hope this is all ok, and thanks for the great module :)