[Wine-patches] ntdll: Fix a problem with SetFileTime (eterbug #5143).

Alexander Morozov amorozov на etersoft.ru
Ср Мар 3 20:04:38 MSK 2010


----------- следующая часть -----------
From 38c28ee2e4de721bfa4a6eeee542fc7b928c4bf3 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 3 Mar 2010 19:48:26 +0300
Subject: [PATCH] ntdll: Fix a problem with SetFileTime (eterbug #5143).

---
 dlls/ntdll/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index f04f975..6323479 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -1856,7 +1856,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
                     tv[1].tv_sec = sec - SECS_1601_TO_1970;
                     tv[1].tv_usec = (UINT)nsec / 10;
                 }
-                if (st.st_uid != getuid())
+                if (!fstat( fd, &st ) && st.st_uid != getuid())
                     WARN("Cannot change time params due different uid\n");
                 else
                     if (futimes( fd, tv ) == -1)
-- 
1.6.5.8



Подробная информация о списке рассылки Wine-patches