On 05/23/2014 02:32 AM, Libor Pechacek wrote:
> +++ b/general.c
> @@ -699,7 +699,10 @@ polite_directory_format (name)
> int l;
>
> home = get_string_value ("HOME");
> - l = home ? strlen (home) : 0;
> +
> + /* remove trailing slashes from $HOME before comparisons */
> + for (l = home ? strlen (home) : 0; l > 1 && home[l-1] == '/'; l--);
> +Does this still work correctly on systems where / and // are distinct (as allowed by POSIX) and someone has set $HOME to //? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
