[Po4a-commits] "po4a po4a,1.37,1.38"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Thu Nov 17 20:03:59 UTC 2005


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv1481

Modified Files:
	po4a 
Log Message:
I prefer using stat. -M returns a time in days (float).
stat clearly states its precision is the second.


Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- po4a	17 Nov 2005 19:27:31 -0000	1.37
+++ po4a	17 Nov 2005 20:03:56 -0000	1.38
@@ -510,8 +510,11 @@
 # make a big pot
 my $update_pot_file = 0;
 if (-e $pot_filename) {
+    my $modtime = (stat $pot_filename)[9];
+    # The POT needs to be re-generated if a master document is more recent
+    # than the POT.
     foreach my $master (keys %document) {
-        if (-M $master < -M $pot_filename) {
+        if ((stat $master)[9] > $modtime) {
             $update_pot_file = 1;
             print wrap_msg(gettext("Updating %s:"), $pot_filename)
                 if $po4a_opts{"verbose"};




More information about the Po4a-commits mailing list