mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 17:31:15 +00:00
msvcrt: Use fd critical section in _futime64.
This commit is contained in:
parent
16285f5700
commit
9278190d46
@ -1788,7 +1788,7 @@ int CDECL MSVCRT__fstat64i32(int fd, struct MSVCRT__stat64i32* buf)
|
|||||||
*/
|
*/
|
||||||
int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
|
int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
|
||||||
{
|
{
|
||||||
HANDLE hand = msvcrt_fdtoh(fd);
|
ioinfo *info = get_ioinfo(fd);
|
||||||
FILETIME at, wt;
|
FILETIME at, wt;
|
||||||
|
|
||||||
if (!t)
|
if (!t)
|
||||||
@ -1802,11 +1802,13 @@ int CDECL _futime64(int fd, struct MSVCRT___utimbuf64 *t)
|
|||||||
time_to_filetime( t->modtime, &wt );
|
time_to_filetime( t->modtime, &wt );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SetFileTime(hand, NULL, &at, &wt))
|
if (!SetFileTime(info->handle, NULL, &at, &wt))
|
||||||
{
|
{
|
||||||
|
release_ioinfo(info);
|
||||||
msvcrt_set_errno(GetLastError());
|
msvcrt_set_errno(GetLastError());
|
||||||
return -1 ;
|
return -1 ;
|
||||||
}
|
}
|
||||||
|
release_ioinfo(info);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user