Skip to content

Commit

Permalink
Fix symlink time set in Windows
Browse files Browse the repository at this point in the history
The link as to be opened with write permission for attributes.
  • Loading branch information
amadvance committed May 13, 2017
1 parent e7d93f7 commit 74d689b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmdline/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ int windows_utimensat(int fd, const char* file, struct windows_timespec tv[2], i
wflags = FILE_FLAG_BACKUP_SEMANTICS;
if ((flags & AT_SYMLINK_NOFOLLOW) != 0)
wflags |= FILE_FLAG_OPEN_REPARSE_POINT;
h = CreateFileW(convert(conv_buf, file), 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, wflags, 0);
h = CreateFileW(convert(conv_buf, file), FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, 0, OPEN_EXISTING, wflags, 0);
if (h == INVALID_HANDLE_VALUE) {
windows_errno(GetLastError());
return -1;
Expand Down

0 comments on commit 74d689b

Please sign in to comment.