Package: uudeview / 0.5.20-12

031_do_not_force_overwrite.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: Don't force overwrite mode if auto-rename enabled.
 0.5.20-3
Author: Chris Hanson
Bug-Debian: https://bugs.debian.org/378076

--- a/unix/uudeview.c
+++ b/unix/uudeview.c
@@ -657,9 +657,6 @@ work_comline (int argc, char *argv[])
     else switch (*(argv[number] + 1)) {
     case '\0':
       interact = 0;
-      if (overwrite == 0) {
-	overwrite = 1;
-      }
       proc_stdin ();
       break;
     case 'a':
@@ -699,10 +696,7 @@ work_comline (int argc, char *argv[])
 	fprintf (stderr, "WARNING: cannot interact when reading from stdin\n");
       }
       else {
-	interact  = (*argv[number] == '+') ? 1 : 0;
-	if (overwrite == 0 && *argv[number] == '-') {
-	  overwrite = 1;
-	}
+	interact = (*argv[number] == '+') ? 1 : 0;
       }
       break;
     case 'm':
@@ -773,6 +767,8 @@ work_comline (int argc, char *argv[])
       break;
     }
   }
+  if (overwrite == 0 && interact == 0 && autoren == 0)
+    overwrite = 1;
 
   return 1;
 }