chore(fs/S3#_rmdir): use _isNotEmptyDir
This commit is contained in:
parent
cb835b7b6a
commit
5f53ebdf12
@ -171,8 +171,7 @@ export default class S3Handler extends RemoteHandlerAbstract {
|
||||
}
|
||||
|
||||
async _rmdir(path) {
|
||||
const entries = await this._list(path)
|
||||
if (entries.length !== 0) {
|
||||
if (await this._isNotEmptyDir(path)) {
|
||||
const error = new Error(`ENOTEMPTY: directory not empty, rmdir '${path}`)
|
||||
error.code = 'ENOTEMPTY'
|
||||
error.path = path
|
||||
|
Loading…
Reference in New Issue
Block a user