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

@akalin-keybase akalin-keybase commented Sep 20, 2016

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 the OS-Windows label Sep 20, 2016
@bradfitz bradfitz added this to the Go1.8 milestone Sep 20, 2016
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Sep 20, 2016

Thanks. Seems easy enough to fix.

/cc @alexbrainman

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Sep 25, 2016

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

@gopherbot gopherbot closed this in 890c09e Sep 25, 2016
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.