From: Johannes Schindelin Date: Sat, 28 Jul 2007 01:03:21 GMT Subject: Re: [PATCH 2/8] Add functions get_relative_cwd() and is_inside_dir() Message-ID: In-Reply-To: <7vps2dy3hb.fsf@assigned-by-dhcp.cox.net> Hi, On Fri, 27 Jul 2007, Junio C Hamano wrote: > Johannes Schindelin 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