gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] file path normalization for my-revision-library


From: James Blackwell
Subject: Re: [Gnu-arch-users] file path normalization for my-revision-library
Date: Tue, 6 Jan 2004 18:08:10 -0500

In lists.arch.users, you wrote:
> Hi James,
>
> On Tue, 2004-01-06 at 04:08, James Blackwell wrote:
>> > This tiny patch adds path normalization to my-revision-library.  At the 
>> > moment, normalization merely removes any trailing backslashes.
>> >
>> > http://www.aaronbentley.com/tla-devel
>> > revision tlasrc--local--1.2--patch-7
>> 
>> I took this patch into my integration branch, 
>
> Thanks for taking the patch.
>
>> with some modifications to the normalize_path function.
>
> I believe your altered version will
> 1. convert "/" into ""
> 2. exhibit undefined behaviour when the argument is "", because we'll
> try to access input [ -1 ]

Changed to:

   if ( i_len >= 2 && input [ i_len - 1 ] == '/')
        i_len--;


-- 
James Blackwell      Using I.T. to bring more             570-407-0488
Owner, Inframix      business to your business     http://inframix.com

GnuPG (ID 06357400) AAE4 8C76 58DA 5902 761D  247A 8A55 DA73 0635 7400




reply via email to

[Prev in Thread] Current Thread [Next in Thread]