[Pkg-mc-commits] r119 - in trunk/debian: . patches

winnie at alioth.debian.org winnie at alioth.debian.org
Wed Mar 5 09:24:11 UTC 2008


Author: winnie
Date: 2008-03-05 09:24:09 +0000 (Wed, 05 Mar 2008)
New Revision: 119

Modified:
   trunk/debian/changelog
   trunk/debian/patches/61_escaping.patch
Log:
Fix two bugs


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-02-27 20:56:29 UTC (rev 118)
+++ trunk/debian/changelog	2008-03-05 09:24:09 UTC (rev 119)
@@ -1,3 +1,12 @@
+mc (1:4.6.2~pre1-6) unstable; urgency=low
+
+  * Fix abort of mc while copying files. (Closes: #425192)
+    + modified 61_escaping.patch
+  * Fix coredump on weired filenames (Closes: #469075)
+    + modified 61_escaping.patch
+
+ -- Patrick Winnertz <winnie at debian.org>  Wed, 05 Mar 2008 10:19:03 +0100
+
 mc (1:4.6.2~pre1-5) unstable; urgency=medium
 
   * Urgency=medium since this upload contain several important things.

Modified: trunk/debian/patches/61_escaping.patch
===================================================================
--- trunk/debian/patches/61_escaping.patch	2008-02-27 20:56:29 UTC (rev 118)
+++ trunk/debian/patches/61_escaping.patch	2008-03-05 09:24:09 UTC (rev 119)
@@ -20,7 +20,7 @@
 +			j = j + 20;
 +			local = g_realloc(local,j);
 +		}
-+		if ( (strchr(" \t*|;<>~#",in[i])) && ( strchr("\\",in[i-1])) ) {
++		if ( (strchr(" \t*|;<>~#()",in[i])) && ( strchr("\\",in[i-1])) ) {
 +			k++;
 +			local[i-k] = in[i];
 +		} else {
@@ -48,7 +48,7 @@
 +			j = j + 20;
 +			local = g_realloc(local,j);
 +		}
-+		if ( (strchr(" \t*|;<>~#",in[i])) && (! strchr("\\",in[i-1])) ) {
++		if ( (strchr(" \t*|;<>~#()",in[i])) && (! strchr("\\",in[i-1])) ) {
 +			local[i+k] = 92; // Ascii for "\"
 +			k = k+1;
 +			local[i+k] = in[i];
@@ -72,45 +72,6 @@
  void str_replace(char *s, char from, char to);
  int  is_printable (int c);
  void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns);
-diff -u -w -r1.151 file.c
---- ./src/file.c	25 Sep 2007 15:33:36 -0000	1.151
-+++ ./src/file.c	27 Feb 2008 15:38:14 -0000
-@@ -63,6 +63,7 @@
- #include "widget.h"
- #include "wtools.h"
- #include "background.h"		/* we_are_background */
-+#include "util.h"
- 
- /* Needed for current_panel, other_panel and WTree */
- #include "dir.h"
-@@ -456,7 +457,7 @@
- };
- 
- int
--copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path,
-+copy_file_file (FileOpContext *ctx, const char *s, const char *d,
- 		int ask_overwrite, off_t *progress_count,
- 		double *progress_bytes, int is_toplevel_file)
- {
-@@ -464,6 +465,8 @@
-     gid_t src_gid = (gid_t) - 1;
- 
-     char *buf = NULL;
-+    const char *dst_path = NULL;
-+    const char *src_path = NULL;
-     int buf_size = BUF_8K;
-     int src_desc, dest_desc = -1;
-     int n_read, n_written;
-@@ -479,7 +482,8 @@
-     /* FIXME: We should not be using global variables! */
-     ctx->do_reget = 0;
-     return_status = FILE_RETRY;
--
-+    dst_path = unescape_string(d);
-+    src_path = unescape_string(s);
-     if (file_progress_show_source (ctx, src_path) == FILE_ABORT ||
- 	file_progress_show_target (ctx, dst_path) == FILE_ABORT)
- 	return FILE_ABORT;
 diff -u -w -r1.61 complete.c
 --- ./src/complete.c	25 Sep 2007 15:33:36 -0000	1.61
 +++ ./src/complete.c	27 Feb 2008 15:38:14 -0000
@@ -164,3 +125,42 @@
      path_tilde = tilde_expand (path);
  
      /* Leave space for further expansion */
+diff -u -w -r1.151 file.c
+--- ./src/file.c	25 Sep 2007 15:33:36 -0000	1.151
++++ ./src/file.c	5 Mar 2008 09:15:47 -0000
+@@ -63,6 +63,7 @@
+ #include "widget.h"
+ #include "wtools.h"
+ #include "background.h"		/* we_are_background */
++#include "util.h"
+ 
+ /* Needed for current_panel, other_panel and WTree */
+ #include "dir.h"
+@@ -791,7 +807,7 @@
+ 	    }
+ 	}
+ 
+-	if (!appending) {
++	if (!appending && ctx->preserve) {
+ 	    while (mc_chmod (dst_path, (src_mode & ctx->umask_kill))) {
+ 		temp_status = file_error (
+ 			_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
+@@ -1872,6 +1890,8 @@
+ 		dest = temp2;
+ 		temp = NULL;
+ 
++		source_with_path = unescape_string(source_with_path);
++		dest = unescape_string(dest);
+ 		switch (operation) {
+ 		case OP_COPY:
+ 		    /*
+@@ -1963,6 +1983,9 @@
+ 		else {
+ 		    char *temp2 = concat_dir_and_file (dest, temp);
+ 
++			source_with_path = unescape_string(source_with_path);
++			temp2 = unescape_string(temp2);
++			
+ 		    switch (operation) {
+ 		    case OP_COPY:
+ 			/*




More information about the Pkg-mc-commits mailing list