On Thu, Feb 09, 2012 at 08:51:03PM +0000, Eitan Adler wrote:
>      /* Prefix should add an @cwd to the packing list */
> -    if (Prefix)
> -     add_plist_top(&plist, PLIST_CWD, Prefix);
> +    if (Prefix) {
> +        char resolved_prefix[PATH_MAX];
> +        if (realpath(Prefix, resolved_prefix) != 0)
> +         err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix);
> +     add_plist_top(&plist, PLIST_CWD, resolved_prefix);
> +    }

This change cause 
"pkg_create: couldn't resolve path for prefix: /usr/local: No such file or 
directory"
because test condition should really be:
        if (realpath(Prefix, resolved_prefix) == NULL)
(and realpath(3) returns char *)

-- 
http://ache.vniz.net/
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to