Re: [PATCH 2/8] Add functions get_relative_cwd() and is_inside_dir()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 28, 2007, 01:03 UTC
- Message-ID
- <Pine.LNX.4.64.0707280203110.14781@racer.site>
- In-Reply-To
- <7vps2dy3hb.fsf@assigned-by-dhcp.cox.net>
Hi,
On Fri, 27 Jul 2007, Junio C Hamano wrote:
Show 13 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > +char *get_relative_cwd(char *buffer, int size, const char *dir)
> > +{
> > + char *cwd = buffer;
> > +
> > + if (!dir)
> > + return 0;
> > +
> > + if (!getcwd(buffer, PATH_MAX))
> > + return 0;
>
> Can size be less than PATH_MAX?Thanks. Will fix.
Ciao, Dscho