delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/20/17:52:17

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E039F1C.A9FB9EB3@phekda.freeserve.co.uk>
Date: Fri, 20 Dec 2002 22:52:12 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: __solve_symlinks and multiple slashes [PATCH]
References: <E18P4WC-0001el-00 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Richard Dawe wrote:
> Below is a patch that fixes the issues with __solve_symlinks
> and multiple consecutive slashes.
[snip]
> I've tested these patches by running the fileutils test suite
> with rebuilt fileutils, sh-utils and textutils. There were
> no regressions in the fileutils test suite - in fact, it worked
> much better, since the {file,sh-,text}utils could cope
> with paths like c://tmp/foo.

Maybe the patch needs more explanation. (I haven't been very coherent over the
past couple of days, due to being slightly ill. Maybe I should have stayed
away from the keyboard...)

__solve_symlinks works by going through the path, component-by-component,
until it hits a symlink. The problem I found was that the code that selected
each component did not cope with multiple consecutive slashes. The patch that
I submitted modifies the function that advances to the next component, so that
it does cope with multiple consecutive patches.

So, OK to commit?

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019