1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-03-01 01:41:52 -05:00

lib/util: modify entry_prefix, not prefix

Modifying prefix caused tmp directories to be left behind after
running scriptlets, and the path '/' to be passed to _alpm_rmrf. Broken
in f01c6f.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2011-06-29 09:22:24 -04:00 committed by Dan McGee
parent 002d2fda7a
commit 0f4aaeee42

View File

@ -300,7 +300,7 @@ int _alpm_unpack(pmhandle_t *handle, const char *archive, const char *prefix,
/* If specific files were requested, skip entries that don't match. */ /* If specific files were requested, skip entries that don't match. */
if(list) { if(list) {
char *entry_prefix = strdup(entryname); char *entry_prefix = strdup(entryname);
char *p = strstr(prefix,"/"); char *p = strstr(entry_prefix,"/");
if(p) { if(p) {
*(p+1) = '\0'; *(p+1) = '\0';
} }