]> Dogcows Code - chaz/tar/blobdiff - src/extract.c
tar: fix core dump with --index-file=bad_path
[chaz/tar] / src / extract.c
index 60ec747f72a9e94d192ab30a31e4da91adf4f1a3..55f3eb860e2a616f982529f667adb044b7caf16c 100644 (file)
@@ -642,11 +642,14 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
 
       switch (old_files_option)
        {
-       case KEEP_OLD_FILES:
+       case SKIP_OLD_FILES:
          WARNOPT (WARN_EXISTING_FILE,
                   (0, 0, _("%s: skipping existing file"), file_name));
          return RECOVER_SKIP;
 
+       case KEEP_OLD_FILES:
+         return RECOVER_NO;
+
        case KEEP_NEWER_FILES:
          if (file_newer_p (file_name, stp, &current_stat_info))
            break;
@@ -995,7 +998,7 @@ extract_file (char *file_name, int typeflag)
        if (written > size)
          written = size;
        errno = 0;
-       count = full_write (fd, data_block->buffer, written);
+       count = blocking_write (fd, data_block->buffer, written);
        size -= written;
 
        set_next_block_after ((union block *)
This page took 0.021151 seconds and 4 git commands to generate.