diff options
author | Dan McGee <dan@archlinux.org> | 2008-02-15 19:40:22 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-02-15 19:40:22 -0600 |
commit | 6b07b5d34512ef361ebf04395f07965cb80d0ec3 (patch) | |
tree | d67f27a25aeae00dedf5c6fab176576c06d1f5d9 /lib/libalpm/conflict.c | |
parent | a16608c6100e8620c03c94e34bb47256c2f5ee32 (diff) | |
parent | be95e4d8a008662eb0e19a3186953511551acec1 (diff) | |
download | pacman-6b07b5d34512ef361ebf04395f07965cb80d0ec3.tar.xz |
Merge branch 'maint'
Conflicts:
lib/libalpm/be_files.c
lib/libalpm/package.c
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r-- | lib/libalpm/conflict.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 9f6f93da..19352d11 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -273,10 +273,7 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB) alpm_list_t *ret = NULL; alpm_list_t *pA = filesA, *pB = filesB; - if(pB == NULL) { - return(alpm_list_strdup(pA)); - } - + /* if both filesA and filesB have entries, do this loop */ while(pA && pB) { const char *strA = pA->data; const char *strB = pB->data; @@ -301,6 +298,15 @@ static alpm_list_t *chk_filedifference(alpm_list_t *filesA, alpm_list_t *filesB) } } } + /* ensure we have completely emptied pA */ + while(pA) { + const char *strA = pA->data; + /* skip directories */ + if(strA[strlen(strA)-1] != '/') { + ret = alpm_list_add(ret, strdup(strA)); + } + pA = pA->next; + } return(ret); } |