Deleted Added
full compact
tape.c (18406) tape.c (21149)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 569 unchanged lines hidden (view full) ---

578 return (GOOD);
579
580 case IFREG:
581 vprintf(stdout, "extract file %s\n", name);
582 if (Nflag) {
583 skipfile();
584 return (GOOD);
585 }
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 569 unchanged lines hidden (view full) ---

578 return (GOOD);
579
580 case IFREG:
581 vprintf(stdout, "extract file %s\n", name);
582 if (Nflag) {
583 skipfile();
584 return (GOOD);
585 }
586 if ((ofile = creat(name, 0666)) < 0) {
586 if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
587 0666)) < 0) {
587 fprintf(stderr, "%s: cannot create file: %s\n",
588 name, strerror(errno));
589 skipfile();
590 return (FAIL);
591 }
592 (void) fchown(ofile, curfile.dip->di_uid, curfile.dip->di_gid);
593 (void) fchmod(ofile, mode);
594 getfile(xtrfile, xtrskip);

--- 767 unchanged lines hidden ---
588 fprintf(stderr, "%s: cannot create file: %s\n",
589 name, strerror(errno));
590 skipfile();
591 return (FAIL);
592 }
593 (void) fchown(ofile, curfile.dip->di_uid, curfile.dip->di_gid);
594 (void) fchmod(ofile, mode);
595 getfile(xtrfile, xtrskip);

--- 767 unchanged lines hidden ---