-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Chtimes doesn't work on directory on Windows #8090
Labels
Milestone
Comments
Update. I did some digging, and the root cause seems to be in the CreateFile() call in UtimesNano() (pkg/syscall/syscall_windows.go), specifically its use of FILE_ATTRIBUTE_NORMAL for the dwFlagsAndAttributes parameter. The docs for CreateFile [1] say that FILE_FLAG_BACKUP_SEMANTICS must be set to obtain a handle to a directory. It also says that opening an existing file "ignores any file attributes" specified, so FILE_ATTRIBUTE_NORMAL is useless. Possible fix? https://gist.github.com/vqvu/d8332f7ce87e13879e5d [1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx |
Sounds like a plan. Here http://golang.org/doc/contribute.html is how to contribute, if you like. Also, please, add new test that is broken now, but will be fixed once your change is applied. Thank you. Alex Status changed to Accepted. |
CL https://golang.org/cl/154020043 mentions this issue. |
This issue was closed by revision ab724f9. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#8090. LGTM=alex.brainman R=alex.brainman CC=golang-codereviews https://golang.org/cl/154020043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 26, 2018
Fixes golang#8090. LGTM=alex.brainman R=alex.brainman CC=golang-codereviews https://golang.org/cl/154020043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
Fixes golang#8090. LGTM=alex.brainman R=alex.brainman CC=golang-codereviews https://golang.org/cl/154020043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 30, 2018
Fixes golang#8090. LGTM=alex.brainman R=alex.brainman CC=golang-codereviews https://golang.org/cl/154020043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by victorvu2001:
The text was updated successfully, but these errors were encountered: