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: Wed, 12 Sep 2007 22:44:37 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/09/12 22:44:37

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

Log message:
        patch #6197

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1320&r2=1.1321
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonComplexOptions.ml?cvsroot=mldonkey&r1=1.80&r2=1.81

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1320
retrieving revision 1.1321
diff -u -b -r1.1320 -r1.1321
--- distrib/ChangeLog   9 Sep 2007 15:15:08 -0000       1.1320
+++ distrib/ChangeLog   12 Sep 2007 22:44:37 -0000      1.1321
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2007/09/13
+6197: Options backup: Better log messages, remove useless exception
+-------------------------------------------------------------------------------
 2007/09/09: version 2.9.1 = tag release-2-9-1
 6192: EDK: Use discovered client_ip when lowid
 

Index: src/daemon/common/commonComplexOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- src/daemon/common/commonComplexOptions.ml   3 Aug 2007 22:12:57 -0000       
1.80
+++ src/daemon/common/commonComplexOptions.ml   12 Sep 2007 22:44:37 -0000      
1.81
@@ -1135,7 +1135,9 @@
            let stat = Unix.stat arg in
            let size = stat.Unix.st_size in
            if size > Sys.max_string_length then
-             failwith (Printf.sprintf "Tar: file %s too big, limit %d byte" 
arg Sys.max_string_length);
+             failwith (Printf.sprintf
+                  "Tar: file %s too big, system limit %d byte, use .zip to 
avoid this limit"
+                    arg Sys.max_string_length);
            let header = 
              { Tar.t_name = arg;
              t_mode = stat.Unix.st_perm;
@@ -1165,10 +1167,12 @@
             lprintf_nl "Tar: Windows specific pseudo error %s in %s" 
(Printexc2.to_string e) arg
       | e ->
          failed_files := arg :: !failed_files;
-         lprintf_nl "Tar: error %s in %s" (Printexc2.to_string e) arg
-    ) files));
+         lprintf_nl "Tar: skipping %s, error %s" arg (Printexc2.to_string e)
+      ) files
+    )
+  );
     if !failed_files <> [] then
-      failwith (Printf.sprintf "Tar: error backing up %s"
+    failwith (Printf.sprintf "Tar: skipped %s due to backup errors"
        (String.concat " " (List.rev !failed_files)))
 
 let backup_options () =
@@ -1195,17 +1199,21 @@
   in
   begin
     try
-    let archive = Filename.concat "old_config" (backup_prefix ^ Date.reverse 
(Unix.time ()) ^ format) in
-      let files = List.sort (fun o -> compare o) (List.filter (fun o ->
+      let archive =
+        Filename.concat "old_config" (backup_prefix ^ Date.reverse (Unix.time 
()) ^ format)
+      in
+      let files =
+        List.sort (fun o -> compare o) (List.filter (fun o ->
          String.lowercase (Filename2.last_extension o) = ".ini"
          && o <> "file_sources.ini") 
-           (Unix2.list_directory file_basedir)) in
+           (Unix2.list_directory file_basedir))
+      in
       begin
         match (Filename2.last_extension archive) with
           ".zip" -> backup_zip archive files
         | _ -> backup_tar archive files
       end
-    with e -> lprintf_nl "Exception %s while options backup" 
(Printexc2.to_string e); raise e
+    with e -> lprintf_nl "Exception %s while options backup" 
(Printexc2.to_string e)
   end;
   lprintf_nl (_b "Options backup as %s correctly saved") format
              




reply via email to

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