-
-
Notifications
You must be signed in to change notification settings - Fork 741
Issue 7819 - setTimes should support folders on Windows #1128
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
Conversation
Should we really be using Also it should be noted that |
Hmm I see. Is there any other way we can implement this? It doesn't work if there's only |
The logical conclusion is that the Windows API was designed such that setting directory times directly should not be possible with usual flags. |
Heh, "designed" :). I can't find a flag which could help, tried looking in here, and various other places (GENERIC_WRITE doesn't work either). Tried to look on SO, only thing I've found is http://stackoverflow.com/a/279944 and it says |
I don't think that has any weight - unless the project author argumented their decision using arguments not mentioned in this discussion, the use of the flag is as uninformed as we are. A better idea would be to check what standard libraries of other language implementations do. |
I'll get to it later, for now closing this. Thanks for the review, we avoided making a mistake. |
Eeeehh, at the very bottom of
PHP also uses it, and everywhere I look that flag is used. |
LGTM. @CyberShadow ? |
I'm fine with it if other languages do it. At least we have something to point a finger at :) |
Issue 7819 - setTimes should support folders on Windows
http://d.puremagic.com/issues/show_bug.cgi?id=7819
FILE_FLAG_BACKUP_SEMANTICS
andFILE_ATTRIBUTE_DIRECTORY
flags to enable setting folder times on Windows (See MSDN docs for these here).enforce
tocenforce
for Posix insetTimes
since the function claimed it only threwFileException
's.Credits to Jay Norwood for the patch for setTimes fix.