diff options
author | Dan McGee <dan@archlinux.org> | 2007-08-17 20:07:05 +0000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-08-17 20:07:05 +0000 |
commit | 9ea7c5c402fd6686cfa3cefeb80c115109538701 (patch) | |
tree | 2eb7d0257981ad0c21dd50b86585f48cb407521f /lib | |
parent | d8b57fcb76e3de6899b500db42706bce75dfd7fe (diff) |
Fix symlink overwrite issue in CVS
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/add.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index ddeca317..afe7a45b 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -700,7 +700,9 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) archive_entry_set_pathname(entry, filename); - if(archive_read_extract(archive, entry, ARCHIVE_EXTRACT_FLAGS) != ARCHIVE_OK) { + int ret = archive_read_extract(archive, entry, + ARCHIVE_EXTRACT_FLAGS | ARCHIVE_EXTRACT_NO_OVERWRITE); + if(ret != ARCHIVE_OK && ret != ARCHIVE_WARN) { _alpm_log(PM_LOG_ERROR, _("could not extract %s (%s)"), filename, strerror(errno)); alpm_logaction(_("error: could not extract %s (%s)"), filename, strerror(errno)); errors++; |