[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: patch: kurl
From:       Simon Hausmann <sh () caldera ! de>
Date:       2000-08-29 7:32:00
[Download RAW message or body]

On Mon, Aug 28, 2000 at 11:37:20PM +0200, David Faure wrote:
> At 13:37 28/08/00 -0700, you wrote:
> >On Mon, 28 Aug 2000, Simon Hausmann wrote:
> >
> >> > Hi,
> >>
> >> There is a small problem with the isParentOf() method of KURL. It
> >> currently breaks when checking if /blah/foo is a parent of /blah/foo2 .
> >> The current isParentOf method returns true, which however is not correct
> >> ;-) . The attached patch fixes it, but I'm not sure if that's the correct
> >> way of doing it. Please review it :-) (some KURL expert)
> >
> >I think it gives a false hit for /blah/foo and /blah/foo2/test. 
> >And what about /blah/foo/ and /blah/foo/test?
> >
> >What about
> >
> >  if (p1.isEmpty() || p1[p1.length()-1] != '/')
> >     p1 += '/';
> >  return (p2.startsWith(p1));
> >
> >*checking actual code*
> >
> >Hm.. it seems cleanDirPath strips the leading '/' that KURL::path(1) had so 
> >carefully added. 
> Ah, that's why :-))
> 
> >What about the attached patch then.
> I prefer this one much more.

Jup :) Please apply :)

Bye,
 Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic