fix
This commit is contained in:
parent
4bc5cf7c64
commit
bb5a9f9737
@ -172,14 +172,14 @@ auto filetime_to_unix_time(const FILETIME &ft) -> remote::file_time {
|
|||||||
LARGE_INTEGER date{};
|
LARGE_INTEGER date{};
|
||||||
date.HighPart = ft.dwHighDateTime;
|
date.HighPart = ft.dwHighDateTime;
|
||||||
date.LowPart = ft.dwLowDateTime;
|
date.LowPart = ft.dwLowDateTime;
|
||||||
date.QuadPart -= 116444736000000000ull;
|
date.QuadPart -= 116444736000000000ULL;
|
||||||
|
|
||||||
return date.QuadPart * 100ull;
|
return date.QuadPart * 100ULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void unix_time_to_filetime(const remote::file_time &ts, FILETIME &ft) {
|
void unix_time_to_filetime(const remote::file_time &ts, FILETIME &ft) {
|
||||||
const auto win_time = (ts / 100ULl) + 116444736000000000ull;
|
const auto win_time = (ts / 100ULL) + 116444736000000000ULL;
|
||||||
ft.dwHighDateTime = win_time >> 32u;
|
ft.dwHighDateTime = win_time >> 32U;
|
||||||
ft.dwLowDateTime = win_time & 0xFFFFFFFF;
|
ft.dwLowDateTime = win_time & 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user