mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Use tv[1] as mtime in Windows futimens and utimensat emulation
This commit is contained in:
parent
3c88559379
commit
576873f0f9
1 changed files with 4 additions and 4 deletions
|
|
@ -1114,9 +1114,9 @@ int windows_futimens(int fd, struct windows_timespec tv[2])
|
|||
* How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME
|
||||
* http://support.microsoft.com/kb/167296
|
||||
*/
|
||||
mtime = tv[0].tv_sec;
|
||||
mtime = tv[1].tv_sec;
|
||||
mtime *= 10000000;
|
||||
mtime += tv[0].tv_nsec / 100;
|
||||
mtime += tv[1].tv_nsec / 100;
|
||||
mtime += 116444736000000000LL;
|
||||
|
||||
ft.dwHighDateTime = mtime >> 32;
|
||||
|
|
@ -1172,9 +1172,9 @@ int windows_utimensat(int fd, const char* file, struct windows_timespec tv[2], i
|
|||
* How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME
|
||||
* http://support.microsoft.com/kb/167296
|
||||
*/
|
||||
mtime = tv[0].tv_sec;
|
||||
mtime = tv[1].tv_sec;
|
||||
mtime *= 10000000;
|
||||
mtime += tv[0].tv_nsec / 100;
|
||||
mtime += tv[1].tv_nsec / 100;
|
||||
mtime += 116444736000000000LL;
|
||||
|
||||
ft.dwHighDateTime = mtime >> 32;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue