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

Dan McGee dpmcgee at gmail.com
Wed Jun 29 10:06:32 EDT 2011


On Wed, Jun 29, 2011 at 8:24 AM, Dave Reisner <d at falconindy.com> wrote:
> 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>
Dan fails again! Thanks for the catch.

> ---
>  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