[pacman-dev] [PATCH] lib/util: modify entry_prefix, not prefix

Dave Reisner d at falconindy.com
Wed Jun 29 09:24:30 EDT 2011


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 at archlinux.org>
---
 lib/libalpm/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 6fbe08a..028ed8a 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -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(list) {
 			char *entry_prefix = strdup(entryname);
-			char *p = strstr(prefix,"/");
+			char *p = strstr(entry_prefix,"/");
 			if(p) {
 				*(p+1) = '\0';
 			}
-- 
1.7.6



More information about the pacman-dev mailing list