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.MkdirAll(path) doesn't return nil when the path already exists on windows #95

Closed
hu13 opened this issue Nov 29, 2019 · 1 comment
Closed

Comments

@hu13
Copy link

hu13 commented Nov 29, 2019

Right here

err := os.MkdirAll(l.dir(), 0744)
, if the path already exists, the docs https://golang.org/pkg/os/#MkdirAll of os.MkdirAll says it expects to return nil.

However, I found that this is not the case on window 10/golang 1.12.7.

Wondering if we can have a defensive check here.

@hu13 hu13 closed this as completed Nov 29, 2019
@hu13
Copy link
Author

hu13 commented Nov 29, 2019

It turned out not to be true if i ran os.MkdirAll on powershell.

Mostly, the user permission issue on my setup.

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

1 participant