- Version: 12.8.1
- Platform: Windows 10 x64 1903
- Subsystem: -
The following code returns an error AFTER SUCCESSFUL deletion of the folder:
[Error: ENOENT: no such file or directory, scandir '...'] {
errno: -4058,
code: 'ENOENT',
syscall: 'scandir',
path: '....'
}
stat(path, (err, _) => {
if (!err) {
rmdir(path, (err) => {
if (err === null) { <<< returns null here and then throws error making this function worthless
done(false)
} else {
done('Error')
}
})
} else {
done(false)
}
})