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: Sat, 24 Mar 2007 16:49:37 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/03/24 16:49:36

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

Log message:
        patch #5813

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1211&r2=1.1212
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonComplexOptions.ml?cvsroot=mldonkey&r1=1.71&r2=1.72

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1211
retrieving revision 1.1212
diff -u -b -r1.1211 -r1.1212
--- distrib/ChangeLog   18 Mar 2007 15:08:18 -0000      1.1211
+++ distrib/ChangeLog   24 Mar 2007 16:49:36 -0000      1.1212
@@ -14,6 +14,10 @@
 ChangeLog
 =========
 
+2007/03/24
+5813: Options: Use original file rights in tar.gz backup,
+      save backups with rights 600
+
 2007/03/18
 5807: Implement new command "man" to display command help
 

Index: src/daemon/common/commonComplexOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonComplexOptions.ml,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- src/daemon/common/commonComplexOptions.ml   18 Feb 2007 00:13:08 -0000      
1.71
+++ src/daemon/common/commonComplexOptions.ml   24 Mar 2007 16:49:36 -0000      
1.72
@@ -1096,7 +1096,8 @@
          Zip.copy_file_to_entry file oc ~level:9 ~mtime:s.U.st_mtime file
        with e ->
          failwith (Printf.sprintf "Zip: error %s in %s" (Printexc2.to_string 
e) file)
-      ) files)
+      ) files);
+    (try Unix.chmod archive 0o600 with _ -> ())
   with e ->
     failwith (Printf.sprintf "Zip: error %s in %s" (Printexc2.to_string e) 
archive)
 
@@ -1115,10 +1116,10 @@
              failwith (Printf.sprintf "Tar: file %s too big, limit %d byte" 
arg Sys.max_string_length);
            let header = 
              { Tar.t_name = arg;
-             t_mode = 0o644;
+             t_mode = stat.Unix.st_perm;
              t_uid = stat.Unix.st_uid;
              t_gid = stat.Unix.st_gid;
-             t_size = 0;
+             t_size = stat.Unix.st_size;
              t_mtime = Int32.of_float stat.Unix.st_mtime;
              t_chksum = 0;
              t_typeflag = REGULAR;
@@ -1144,6 +1145,7 @@
          failed_files := arg :: !failed_files;
          lprintf_nl "Tar: error %s in %s" (Printexc2.to_string e) arg
     ) files);
+    (try Unix.chmod archive 0o600 with _ -> ());
     if !failed_files <> [] then
       failwith (Printf.sprintf "Tar: error backing up %s"
        (String.concat " " (List.rev !failed_files)))




reply via email to

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