We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f74a2a commit 6ca7eb4Copy full SHA for 6ca7eb4
index.js
@@ -235,12 +235,7 @@ module.exports = class RandomAccessFile extends RandomAccessStorage {
235
236
function onrmdir (err) {
237
dir = path.join(dir, '..')
238
-
239
- const isAlreadyUnlinked = err && err.code === 'ENOENT'
240
- const isNotEmpty = err && err.code === 'ENOTEMPTY'
241
- if (isAlreadyUnlinked || isNotEmpty || dir === root) return req.callback(null)
242
243
- if (err) return req.callback(err)
+ if (err || dir === root) return req.callback(null)
244
fs.rmdir(dir, onrmdir)
245
}
246
0 commit comments