bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar-1.15.92 sends verbose output to stdout


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] tar-1.15.92 sends verbose output to stdout
Date: Sat, 14 Oct 2006 13:50:37 +0300

Mike Frysinger <address@hidden> wrote:

> a user pointed out that 1.15.92 behaves differently from 1.15.91 and older 
> and 
> this tends to break things ... for example:

Fixed. Thank you.

Regards,
Sergey

Index: src/buffer.c
===================================================================
RCS file: /cvsroot/tar/tar/src/buffer.c,v
retrieving revision 1.107
diff -p -u -r1.107 buffer.c
--- src/buffer.c        2 Oct 2006 15:44:09 -0000       1.107
+++ src/buffer.c        14 Oct 2006 10:41:03 -0000
@@ -474,6 +474,11 @@ _open_archive (enum access_mode wanted_a
          abort (); /* Should not happen */
          break;
        }
+
+      if (!index_file_name
+         && wanted_access == ACCESS_WRITE
+         && strcmp (archive_name_array[0], "-") == 0)
+       stdlis = stderr;
     }
   else if (strcmp (archive_name_array[0], "-") == 0)
     {
@@ -499,12 +504,16 @@ _open_archive (enum access_mode wanted_a
 
        case ACCESS_WRITE:
          archive = STDOUT_FILENO;
+         if (!index_file_name)
+           stdlis = stderr;
          break;
 
        case ACCESS_UPDATE:
          archive = STDIN_FILENO;
          write_archive_to_stdout = true;
          record_end = record_start; /* set up for 1st record = # 0 */
+         if (!index_file_name)
+           stdlis = stderr;
          break;
        }
     }

reply via email to

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