Hi Rob, Sorry, the changes were indeed broken. I have removed the additional methods on LocalReference and updated Directory to make the normalization logic work.
Best regards, Jerome > -----Message d'origine----- > De : Rob Heittman [mailto:[EMAIL PROTECTED] > Envoyé : lundi 24 septembre 2007 01:44 > À : [email protected] > Objet : Re: Bug: DirectoryResource is broken if used with > relative paths > > > I'm getting a test failure building trunk 2181, probably this > change is the culprit?!? > > [junit] java.lang.ClassCastException: org.restlet.data.Reference > [junit] at > org.restlet.data.LocalReference.getTargetRef(LocalReference.java:333) > > etc. > > - Rob > > > ----- Original Message ----- > From: "Jerome Louvel" <[EMAIL PROTECTED]> > To: [email protected] > Sent: Sunday, September 23, 2007 3:35:55 PM (GMT-0500) > America/New_York > Subject: RE: Bug: DirectoryResource is broken if used with > relative paths > > > Hi all, > > The Directory constructors now automatically normalize the root > URI/Reference to prevent this kind of issues. Please test the > code in SVN > trunk or in SVN 1.0 branch and let me know if this solves the issue. > > Also, the LocalReference's getTargetRef(), getRelativeRef() and > getParentRef() methods now return a LocalReference instance. > > Best regards, > Jerome > > > -----Message d'origine----- > > De : news [mailto:[EMAIL PROTECTED] De la part de Joel Nelson > > Envoyé : mercredi 19 septembre 2007 17:44 > > À : [email protected] > > Objet : Re: Bug: DirectoryResource is broken if used with > > relative paths > > > > Marc, I agree there needs to be more research into this > > around symlinks > > and the canonicalization of "../" > > > > However for this bug I've found, the issue is not how to correctly > > canonicalize paths. Instead, the issue is that we need to pick one > > approach within the code I've cited, either to normalize or not. > > FileClientHelper is already normalizing these paths, so I > > suggested to just > > normalize the targetUri/directoryUri within the > > DirectoryResource, so the > > rootLength is appropriate. > > > > Please look at the code I'm talking about in > > DirectoryResource.getVariants(), and tell me if I'm making sense? > >

