Tim Ruehsen <[email protected]> writes:

> Sorry to say this, there is a little bug in my changes:
>     if (!p || !asprintf(&home,"%.*s", (int)(p - path), path))
>       return NULL;
>
> should be
>
>     if (!p || asprintf(&home,"%.*s", (int)(p - path), path) == -1)
>       return NULL;
>
> What about the 'remove trailing path seperator' code.
> I think it is not need, since on most systems 'path/filename' is treated the 
> same as 'path//filename'.
> What do you think ?

f//bar is different than foo/bar, some file systems might support an
empty file name.  IIRC, POSIX allows it.

Giuseppe

Reply via email to