(path, options, originalErr, callback)
| 106 | |
| 107 | |
| 108 | function _rmdir(path, options, originalErr, callback) { |
| 109 | rmdir(path, (err) => { |
| 110 | if (err) { |
| 111 | if (notEmptyErrorCodes.has(err.code)) |
| 112 | return _rmchildren(path, options, callback); |
| 113 | if (err.code === 'ENOTDIR') |
| 114 | return callback(originalErr); |
| 115 | } |
| 116 | |
| 117 | callback(err); |
| 118 | }); |
| 119 | } |
| 120 | |
| 121 | |
| 122 | function _rmchildren(path, options, callback) { |
no test coverage detected