This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: fix File.setLastModified


Found while running the jakarta-commons-io testsuite.  Ok for HEAD and
4.1 branch?

AG


2006-07-13  Anthony Green  <green@redhat.com>

	* java/io/natFilePosix.cc (performSetLastModified): Return true on
	success, false otherwise.


Index: java/io/natFilePosix.cc
===================================================================
--- java/io/natFilePosix.cc	(revision 115433)
+++ java/io/natFilePosix.cc	(working copy)
@@ -403,7 +403,7 @@
   
   tb.actime = time / 1000;
   tb.modtime = time / 1000;
-  return ::utime (buf, &tb);
+  return (::utime (buf, &tb) == 0);
 #else
   return false;
 #endif



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]