mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 19:37:06 -05:00
Use tv[1] as mtime in Windows futimens and utimensat emulation
This commit is contained in:
parent
7343d59be4
commit
46daa8df41
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
|
* How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME
|
||||||
* http://support.microsoft.com/kb/167296
|
* http://support.microsoft.com/kb/167296
|
||||||
*/
|
*/
|
||||||
mtime = tv[0].tv_sec;
|
mtime = tv[1].tv_sec;
|
||||||
mtime *= 10000000;
|
mtime *= 10000000;
|
||||||
mtime += tv[0].tv_nsec / 100;
|
mtime += tv[1].tv_nsec / 100;
|
||||||
mtime += 116444736000000000LL;
|
mtime += 116444736000000000LL;
|
||||||
|
|
||||||
ft.dwHighDateTime = mtime >> 32;
|
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
|
* How To Convert a UNIX time_t to a Win32 FILETIME or SYSTEMTIME
|
||||||
* http://support.microsoft.com/kb/167296
|
* http://support.microsoft.com/kb/167296
|
||||||
*/
|
*/
|
||||||
mtime = tv[0].tv_sec;
|
mtime = tv[1].tv_sec;
|
||||||
mtime *= 10000000;
|
mtime *= 10000000;
|
||||||
mtime += tv[0].tv_nsec / 100;
|
mtime += tv[1].tv_nsec / 100;
|
||||||
mtime += 116444736000000000LL;
|
mtime += 116444736000000000LL;
|
||||||
|
|
||||||
ft.dwHighDateTime = mtime >> 32;
|
ft.dwHighDateTime = mtime >> 32;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue