fixed handling of absolute urls
authorhaftmann
Tue, 16 May 2006 09:19:12 +0200
changeset 19639 d9079a9ccbfb
parent 19638 4358b88a9d12
child 19640 40ec89317425
fixed handling of absolute urls
Admin/website/build/pypager.py
--- a/Admin/website/build/pypager.py	Mon May 15 19:40:17 2006 +0200
+++ b/Admin/website/build/pypager.py	Tue May 16 09:19:12 2006 +0200
@@ -204,6 +204,8 @@
 
         if loc.startswith("//"):
             return path.join(self._dstRoot, loc[2:])
+        elif loc.startswith("http:") or loc.startswith("https:"):
+            return loc
         else:
             return path.join(self._dstRoot, self._relLoc, loc)
 
@@ -216,10 +218,13 @@
 
     def relDstPathOf(self, loc):
 
-        loc = self.absDstPathOf(loc)
-        loc = self.stripCommonPrefix(loc, self._dstRoot)
-        loc = posixpath.join(self._relRoot, loc)
-        return loc
+        if loc.startswith("http:") or loc.startswith("https:"):
+            return loc
+        else:
+            loc = self.absDstPathOf(loc)
+            loc = self.stripCommonPrefix(loc, self._dstRoot)
+            loc = posixpath.join(self._relRoot, loc)
+            return loc
 
     def relLocOfThis(self):