X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fextract.c;h=b3f06dc4db6744381c17f016222723c5a16f3b69;hb=33a2b1fc06b574ac763b43e047f145604d075696;hp=a9fcb6969c2758d5d8b7cac32acf1eb72f4c692a;hpb=9cb6f5c46626aa0a8b6ce89b949fe3d9aad3feee;p=chaz%2Ftar diff --git a/src/extract.c b/src/extract.c index a9fcb69..b3f06dc 100644 --- a/src/extract.c +++ b/src/extract.c @@ -498,9 +498,9 @@ Removing leading `/' from absolute path names in the archive"))); for (counter = 0; counter < SPARSES_IN_OLDGNU_HEADER; counter++) { sparsearray[counter].offset = - OFF_FROM_OCT (current_header->oldgnu_header.sp[counter].offset); + OFF_FROM_CHARS (current_header->oldgnu_header.sp[counter].offset); sparsearray[counter].numbytes = - SIZE_FROM_OCT (current_header->oldgnu_header.sp[counter].numbytes); + SIZE_FROM_CHARS (current_header->oldgnu_header.sp[counter].numbytes); if (!sparsearray[counter].numbytes) break; } @@ -533,9 +533,9 @@ Removing leading `/' from absolute path names in the archive"))); if (exhdr->sparse_header.sp[counter].numbytes == 0) break; sparsearray[counter + ind].offset = - OFF_FROM_OCT (exhdr->sparse_header.sp[counter].offset); + OFF_FROM_CHARS (exhdr->sparse_header.sp[counter].offset); sparsearray[counter + ind].numbytes = - SIZE_FROM_OCT (exhdr->sparse_header.sp[counter].numbytes); + SIZE_FROM_CHARS (exhdr->sparse_header.sp[counter].numbytes); } if (!exhdr->sparse_header.isextended) break; @@ -564,8 +564,8 @@ Removing leading `/' from absolute path names in the archive"))); again_file: openflag = (keep_old_files_option || unlink_first_option ? - O_BINARY | O_NDELAY | O_WRONLY | O_CREAT | O_EXCL : - O_BINARY | O_NDELAY | O_WRONLY | O_CREAT | O_TRUNC) + O_WRONLY | O_BINARY | O_NONBLOCK | O_CREAT | O_EXCL : + O_WRONLY | O_BINARY | O_NONBLOCK | O_CREAT | O_TRUNC) | ((typeflag == GNUTYPE_SPARSE) ? 0 : O_APPEND); /* JK - The last | is a kludge to solve the problem the O_APPEND