Skip to content

Commit

Permalink
Continue extracting even if there is an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsbrinkhoff committed Sep 17, 2019
1 parent f0f35b4 commit ee060b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions itstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static void extfiles(int argc,char **argv)
}

/* skip a single file */
static void skipfile()
void skipfile()
{
while (taperead() >= 0)
;
Expand Down Expand Up @@ -446,7 +446,6 @@ static void extfile()
sprintf(lname,"%s/%s.%s",lufd,lfn1,lfn2); /* combine */
if(symlink(lname,fname)<0) { /* create link */
perror(fname);
exit(1);
}
/* can't apply dates since target may not exist */
taperead(); /* read the EOF mark */
Expand All @@ -462,7 +461,7 @@ static void extfile()
else u.actime=u.modtime; /* use creation date if not */
if(utime(fname,&u)<0) {
perror("?Error setting file dates");
exit(1);
taperead(); /* read the EOF mark */
}
}
}
Expand Down
1 change: 1 addition & 0 deletions itstar.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ void save(char *f);
void resetbuf();
void tapeflush();
int taperead();
void skipfile();
void inword(long *l,long *r);
void outword(register unsigned long l,register unsigned long r);
int nextword(long *l,long *r);
Expand Down
3 changes: 2 additions & 1 deletion pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ void pack(char *file)
out=fopen(file,"wb"); /* create output file */
if(out==NULL) {
perror(file);
exit(1);
skipfile();
return;
}

if((remaining()==0)&&(taperead()<0)) {
Expand Down

0 comments on commit ee060b4

Please sign in to comment.