Date: Fri, 25 Aug 2000 13:57:56 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: lauras AT softhome DOT net Message-Id: <8011-Fri25Aug2000135755+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b CC: djgpp-workers AT delorie DOT com In-reply-to: <39A63EFE.8FE71567@softhome.net> (message from Laurynas Biveinis on Fri, 25 Aug 2000 11:40:14 +0200) 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> <39A63EFE DOT 8FE71567 AT softhome DOT net> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Fri, 25 Aug 2000 11:40:14 +0200 > From: Laurynas Biveinis > > > 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. Ah, okay then. I don't know why did I think it will make any trouble. Returning one slash less is okay, I think. > 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.) The only rule is that if some insane file name succeeds, so should what you return. And it shouldn't crash if the original one doesn't. > > Also, what about file names such as /dev/env/FOO or /dev/c/foo? Does > > this code DTRT for them? > > Can't imagine why. Sorry, I don't understand: will it work or not? I was afraid that removing FOO from /dev/env/FOO will cause it to fail, since /dev/env doesn't have a meaning without the variable name. And the same with /dev/c/foo.