Skip to content

use os.tmpdir() instead of os.tmpDir() - #382

Closed
ChALkeR wants to merge 1 commit into
node-formidable:masterfrom
ChALkeR:tmpdir
Closed

use os.tmpdir() instead of os.tmpDir()#382
ChALkeR wants to merge 1 commit into
node-formidable:masterfrom
ChALkeR:tmpdir

Conversation

@ChALkeR

@ChALkeR ChALkeR commented May 13, 2016

Copy link
Copy Markdown

@ChALkeR

ChALkeR commented May 13, 2016

Copy link
Copy Markdown
Author

Ah, yes. This fails on Node.js 0.8, since os.tmpdir was introduced in 0.9.x.

Comment thread lib/incoming_form.js
this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024;
this.keepExtensions = opts.keepExtensions || false;
this.uploadDir = opts.uploadDir || os.tmpDir();
this.uploadDir = opts.uploadDir || os.tmpdir();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to fix the failed test, how about

this.uploadDir = opts.uploadDir || (os.tmpdir || os.tmpDir)();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gswalden I'm pretty sure that Node.js 0.8 support can and should be dropped. I.e. not break on a purpose, but don't care about it specifically, so this doesn't need code complication.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but I have no write access to this repo, just trying to usher this along.

@felixge

felixge commented Jan 11, 2017

Copy link
Copy Markdown
Collaborator

See #412

@ChALkeR

ChALkeR commented Jan 11, 2017

Copy link
Copy Markdown
Author

@felixge I don't use node-formidable, this issue was found during mass npm package scanning.

@kornelski

Copy link
Copy Markdown
Contributor

This is done

@kornelski kornelski closed this Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants