Ver código fonte

* sys-time.c: Properly set the modification time, instead of using the
access time as the modification time. Fixes #494253.

svn path=/trunk/mono/; revision=131601

Jonathan Pryor 16 anos atrás
pai
commit
5ebb3b6c77
2 arquivos alterados com 9 adições e 4 exclusões
  1. 5 0
      support/ChangeLog
  2. 4 4
      support/sys-time.c

+ 5 - 0
support/ChangeLog

@@ -1,3 +1,8 @@
+2009-04-13  Jonathan Pryor  <[email protected]>
+
+	* sys-time.c: Properly set the modification time, instead of using the
+	  access time as the modification time.  Fixes #494253.
+
 2009-03-20  Jonathan Pryor  <[email protected]>
 
 	* x-struct-str.c: It's possible for struct members to be NULL, so make 

+ 4 - 4
support/sys-time.c

@@ -90,10 +90,10 @@ static inline struct timeval*
 copy_utimes (struct timeval* to, struct Mono_Posix_Timeval *from)
 {
 	if (from) {
-		to[0].tv_sec  = from->tv_sec;
-		to[0].tv_usec = from->tv_usec;
-		to[1].tv_sec  = from->tv_sec;
-		to[1].tv_usec = from->tv_usec;
+		to[0].tv_sec  = from[0].tv_sec;
+		to[0].tv_usec = from[0].tv_usec;
+		to[1].tv_sec  = from[1].tv_sec;
+		to[1].tv_usec = from[1].tv_usec;
 		return to;
 	}