mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Tue, 14 Nov 2006 13:52:40 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/11/14 13:52:39

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonWeb.ml 

Log message:
        patch #5551

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1091&r2=1.1092
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonWeb.ml?cvsroot=mldonkey&r1=1.33&r2=1.34

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1091
retrieving revision 1.1092
diff -u -b -r1.1091 -r1.1092
--- distrib/ChangeLog   14 Nov 2006 11:25:05 -0000      1.1091
+++ distrib/ChangeLog   14 Nov 2006 13:52:39 -0000      1.1092
@@ -15,6 +15,7 @@
 =========
 
 2006/11/14
+5551: web_infos: Fix mtime detection, old files were not updated
 5550: debug_fileinfo: Print [a|c|m]time values
 5530: GD: Improve graph output (skeeve, Schlumpf)
 - html_mods_vd_gfx_h_grid_variable

Index: src/daemon/common/commonWeb.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonWeb.ml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/daemon/common/commonWeb.ml      14 Jul 2006 13:24:23 -0000      1.33
+++ src/daemon/common/commonWeb.ml      14 Nov 2006 13:52:39 -0000      1.34
@@ -100,27 +100,21 @@
     match !date with
       None -> H.wget r f
     | Some date ->
-       let html_time =
-         begin try
-           let t = Date.time_of_string date in
-             r.H.req_save_to_file_time <- t;
-             Unix.gmtime t
-         with e ->
-           let t = Unix.time () in
-             r.H.req_save_to_file_time <- t;
-             Unix.gmtime t
-         end
-       in
        let file = Filename.concat "web_infos" (Filename.basename 
r.H.req_url.Url.short_file) in
+       r.H.req_save_to_file_time <- (begin try
+           Date.time_of_string date
+         with e ->
+           Unix.time ()
+         end);
        if not (Sys.file_exists file) then
          H.wget r f
        else
          begin
            let file_date = Unix.LargeFile.stat file in
-           let file_time = Unix.gmtime file_date.Unix.LargeFile.st_mtime in
-             if html_time <= file_time then
+             if r.H.req_save_to_file_time <= file_date.Unix.LargeFile.st_mtime 
then
                begin
-               lprintf_nl (_b "using local version of %s, HTML header (%s)") 
file date;
+               lprintf_nl (_b "using local version of %s (%s), HTML header 
(%s)")
+                 file (Date.to_full_string file_date.Unix.LargeFile.st_mtime) 
date;
                (f file : unit)
                end
              else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]