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

os: Remove(x) doesn't return an error that passes os.IsExist() on Windows #17164

Closed
akalin-keybase opened this issue Sep 20, 2016 · 2 comments
Closed

Comments

@akalin-keybase
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.7

What operating system and processor architecture are you using (go env)?

Windows

What did you do?

Example program:

https://play.golang.org/p/pd_mMUsR-c

What did you expect to see?

This should print "is exist = true" on Windows, too.

What did you see instead?

(Caveat: didn't run exactly this program, but a similar one.)

On Windows, an errno of 145 is returned, which corresponds to ERROR_DIR_NOT_EMPTY.

From https://golang.org/src/os/error_windows.go , it looks like this particular value isn't in isExist.

@akalin-keybase akalin-keybase changed the title os: Remove(x) doesn't return an error that passes os.IsExists() on Windows os: Remove(x) doesn't return an error that passes os.IsExist() on Windows Sep 20, 2016
@bradfitz bradfitz added this to the Go1.8 milestone Sep 20, 2016
@bradfitz
Copy link
Contributor

Thanks. Seems easy enough to fix.

/cc @alexbrainman

@gopherbot
Copy link

CL https://golang.org/cl/29753 mentions this issue.

@golang golang locked and limited conversation to collaborators Sep 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants