Skip to content
Permalink
Browse files
fix(core): Handle Windows EACCES errors correctly
  • Loading branch information
jan-molak committed Sep 5, 2019
1 parent 002c25f commit 491499e0d9a376fafbc002201375e458625e5600
Showing with 3 additions and 1 deletion.
  1. +3 −1 packages/core/src/io/FileSystem.ts
@@ -69,9 +69,11 @@ export class FileSystem {
}

const caughtErr = !! ~['EACCES', 'EPERM', 'EISDIR'].indexOf(error.code);
if (! caughtErr || caughtErr && current.equals(relativeOrAbsolutePathToDirectory)) {
if (! caughtErr || (caughtErr && current.equals(relativeOrAbsolutePathToDirectory))) {
throw error; // Throw if it's just the last created dir.
}

return resolve(current);
});
}));
}, Promise.resolve(absolutePath.root()));

0 comments on commit 491499e

Please sign in to comment.