[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - resource.py:1.3.12.2
Marius Gedminas
mgedmin@centras.lt
Tue, 20 May 2003 10:26:43 +0300
On Mon, May 19, 2003 at 10:36:03AM -0400, Steve Alexander wrote:
> Log Message:
> Removed use of joinPath. joinPath should not be used for URLs, it should
> be used only for traversal paths.
[...]
> - # XXX This test would be unnecessary if joinPath were made to eat
> - # empty path elements.
> - if skin:
> - return joinPath(base_url, skin, '@@', name)
> - else:
> - return joinPath(base_url, '@@', name)
> + return u'/'.join([segment
> + for segment in (base_url, skin, '@@', name)
> + if segment
> + ])
Won't this result in double slashes when base_url is, e.g.,
"http://example.com/"?
Marius Gedminas
--
Codeworks is available for Zope consulting -- http://www.codeworks.lt/