Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Was getting `ERROR: EPERM, mkdir 'C:\'` on Windows #18

Closed
wants to merge 1 commit into from

2 participants

AJ ONeal James Halliday
AJ ONeal

Was getting ERROR: EPERM, mkdir 'C:\' on Windows with node-tar on windows (which uses fstream which uses mkdirp). Checking for EPERM and allowing it to pass on to EEXIST solved it.

AJ ONeal coolaj86 Was getting `ERROR: EPERM, mkdir 'C:\'` with node-tar on windows (whi…
…ch uses fstream which uses mkdirp). Checking for EPERM solved it.
6efe470
AJ ONeal

note the misspelling of precedence...

AJ ONeal

bump

@substack, will you please merge this in?

James Halliday
Owner

Closing this since I got a patch from @isaacs that handles the EPERM case plus some other ones and has a test.

James Halliday substack closed this
AJ ONeal

cool beans, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2012
  1. AJ ONeal

    Was getting `ERROR: EPERM, mkdir 'C:\'` with node-tar on windows (whi…

    coolaj86 authored
    …ch uses fstream which uses mkdirp). Checking for EPERM solved it.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 index.js
5 index.js
View
@@ -32,6 +32,11 @@ function mkdirP (p, mode, f, made) {
// However, the dir could already exist, in which case
// the EROFS error will be obscuring a EEXIST!
// Fallthrough to that case.
+ case 'EPERM':
+ // no write permissions
+ // On Windows EPERM take precidence over EEXIST,
+ // so the directory may, in fact, exist
+ // Fallthrough to that case.
case 'EEXIST':
fs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
Something went wrong with that request. Please try again.