From 9ea7c5c402fd6686cfa3cefeb80c115109538701 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 17 Aug 2007 20:07:05 +0000 Subject: Fix symlink overwrite issue in CVS --- lib/libalpm/add.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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++; -- cgit v1.2.3-2-g168b