Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmDir ENOENT: no such file or directory after successful deletion of the folder #29279

Closed
talaikis opened this issue Aug 23, 2019 · 3 comments
Closed

Comments

@talaikis
Copy link

  • 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)
  }
})
@talaikis talaikis changed the title rmDir ENOENT: no such file or directory rmDir ENOENT: no such file or directory after successful deletion of the folder Aug 23, 2019
@talaikis
Copy link
Author

Figured that out.

@greend29

This comment has been minimized.

@greend29

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants