Explorar o código

(decode_options): Initialize stdlis

Sergey Poznyakoff %!s(int64=19) %!d(string=hai) anos
pai
achega
36fe16aaf5
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/tar.c

+ 10 - 0
src/tar.c

@@ -2198,6 +2198,16 @@ decode_options (int argc, char **argv)
       break;
     }
 
+  /* Initialize stdlis */
+  if (index_file_name)
+    {
+      stdlis = fopen (index_file_name, "w");
+      if (! stdlis)
+	open_error (index_file_name);
+    }
+  else
+    stdlis = to_stdout_option ? stderr : stdout;
+
   archive_name_cursor = archive_name_array;
 
   /* Prepare for generating backup names.  */