On 12/28/05, David Stanek <[EMAIL PROTECTED]> wrote: > On Fri, Dec 23, 2005 at 03:59:03PM -0500, Kevin Dangoor wrote: > > Some Windows users have been complaining about endless loops, and one > > tracked it down to TemplatePath.relativize (which does, in fact, have > > a while 1 in it). In looking at that method, I'm not entirely certain > > what the point is... if you're looking for a file that is relative to > > another one, can't you just normpath(join(dirname(file), path))? why > > does it need to check with the paths set in the TemplatePath? > > I think you are right. The call to TemplatePath.relativize should be > something simpler. It is possible in the current implementation for > the wrong file to be found. See > kid.test.test_templatepath.Xtest_bad_relative for an example of > this. I have created a patch for this, but would like some input > before I commit it. The patch has been attached to ticket #110[0].
The patch looks fine to me, but I'm not running Windows so I've never seen the problem in action myself. I wouldn't worry too much about committing: we know the current behavior is broken and you've got a test that shows breakage. If you commit it, anyone tracking svn can give it a try easily and let us know if this one is working for them. > Another thing I noticed is that the cache was not working. I cannot > see place where it is being set. Even if it were working I am not > sure this is the right place for a cache. This class manages the > template path and should not be burdened by this extra > responsibility. A better place for a cache would be the load* > functions right? Yeah, a class for looking up paths doesn't seem like the right place for a cache. Kevin ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss