That's much cleaner; good thinking.  I'll update this evening.

On Jun 11, 2013, at 3:28 PM, Artur Adib wrote:

> In shell.js:
> 
> > @@ -1698,18 +1698,22 @@ function tempDir() {
> >    if (state.tempDir)
> >      return state.tempDir; // from cache
> >  
> > -  state.tempDir = writeableDir(process.env['TMPDIR']) ||
> > -                  writeableDir(process.env['TEMP']) ||
> > -                  writeableDir(process.env['TMP']) ||
> > -                  writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS
> > -                  writeableDir('C:\\TEMP') || // Windows
> > -                  writeableDir('C:\\TMP') || // Windows
> > -                  writeableDir('\\TEMP') || // Windows
> > -                  writeableDir('\\TMP') || // Windows
> > -                  writeableDir('/tmp') ||
> > -                  writeableDir('/var/tmp') ||
> > -                  writeableDir('/usr/tmp') ||
> > -                  writeableDir('.'); // last resort
> > +  state.tempDir = os.tmpDir ?
> how about just state.tempDir = writeableDir(os.tmpDir) || that way we know the dir is writeable and we don't have to test for the presence of os.tmpDir
> 
> —
> Reply to this email directly or view it on GitHub.
>