Changeset ff381a7 in mainline for uspace/app/untar/main.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/untar/main.c

    r3feeab2 rff381a7  
    103103static int handle_directory(const tar_header_t *header, FILE *tarfile)
    104104{
    105         int rc = mkdir(header->filename, 0755);
    106         if ((rc == EEXIST) || (rc == EEXISTS)) {
    107                 // printf("Note: directory %s already exists.\n", header->filename);
    108                 rc = EOK;
    109         }
    110         if (rc != EOK) {
    111                 fprintf(stderr, "Failed to create directory %s: %s.\n",
    112                     header->filename, str_error(rc));
    113                 return rc;
     105        if (mkdir(header->filename, 0755) != 0) {
     106                if (errno != EEXIST) {
     107                        fprintf(stderr, "Failed to create directory %s: %s.\n",
     108                            header->filename, str_error(errno));
     109                        return errno;
     110                }
    114111        }
    115112
Note: See TracChangeset for help on using the changeset viewer.