Skip to content

Commit

Permalink
[Fixes #59] windows stat can throw EPERM
Browse files Browse the repository at this point in the history
(Caught by our new CI as well, so tests are already included)
  • Loading branch information
stefanpenner committed Jun 11, 2021
1 parent 91c62af commit 3838654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getStat(path: string, fs: walkSync.Options['fs'] = fsNode) {
try {
return fs.statSync(path);
} catch(error) {
if (error !== null && typeof error === 'object' && (error.code === 'ENOENT' || error.code === 'ENOTDIR')) {
if (error !== null && typeof error === 'object' && (error.code === 'ENOENT' || error.code === 'ENOTDIR' || error.code === 'EPERM')) {
return;
}
throw error;
Expand Down

0 comments on commit 3838654

Please sign in to comment.