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

Alexander Morozov amorozov на etersoft.ru
Вт Мар 27 21:39:00 MSK 2012


---
 dlls/ntdll/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d2ac8bb..a30f406 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2108,7 +2108,7 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
                     tv[1].tv_sec = sec - SECS_1601_TO_1970;
                     tv[1].tv_usec = 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.7.9.4



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