break;
}
case S_IFDIR:
+ unlink(file_header->name);
res = mkdir(file_header->name, file_header->mode);
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
perror_msg("extract_archive: %s", file_header->name);
break;
case S_IFLNK:
/* Symlink */
+ unlink(file_header->name);
res = symlink(file_header->link_name, file_header->name);
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name);
case S_IFBLK:
case S_IFCHR:
case S_IFIFO:
+ unlink(file_header->name);
res = mknod(file_header->name, file_header->mode, file_header->device);
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
perror_msg("Cannot create node %s", file_header->name);