Message-ID: <39A63EFE.8FE71567@softhome.net> Date: Fri, 25 Aug 2000 11:40:14 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.74 [en] (Win98; U) X-Accept-Language: lt,en MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: Update __solve_dir_symlinks() patch References: <39A577FD DOT 834F90D1 AT softhome DOT net> <3405-Fri25Aug2000105230+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > Looks okay (inspection only), but I wonder whether the recursive > invocation of basename is such a good idea. Recursive? I failed to find any recursion there. basename() can be called max 2 times. > Imagine an argument such > as "c:/foo///////////////////////////////////////////////////////". What would be sane response to this arg? My current code after some, uhm, resolving would return the same c:/foo/////.../ with one slash less. In general, is it OK to follow GIGO principle for insane paths? (provided, that 'garbage-in' part does not cause any crashes, infinite loops etc.) > Also, what about file names such as /dev/env/FOO or /dev/c/foo? Does > this code DTRT for them? Can't imagine why. > It looks like it depends what does > __solve_symlinks does for these names. Yes, except for short ones: /dev/c/ would call __solve_symlinks() for 'dev', and append 'c'. > I suggest to add the "/dev/..." names to the test suite. Will do.