From a162dda507fc3677a2f3aba7b18d5a69a753009a Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 12 Jun 2007 18:07:52 +0000 Subject: Don't force use of "/" at the end of URLs --- RepSys/mirror.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/RepSys/mirror.py b/RepSys/mirror.py index 7a0bc4e..af4bedf 100644 --- a/RepSys/mirror.py +++ b/RepSys/mirror.py @@ -8,7 +8,6 @@ def _normdirurl(url): """normalize url for relocate_path needs""" parsed = urlparse.urlparse(url) path = os.path.normpath(parsed.path) - path += "/" # assuming we always deal with directories newurl = urlparse.urlunparse((parsed.scheme, parsed.netloc, path, parsed.params, parsed.query, parsed.fragment)) return newurl @@ -31,7 +30,7 @@ def relocate_path(oldparent, newparent, url): oldparent = _normdirurl(oldparent) newparent = _normdirurl(newparent) url = _normdirurl(url) - subpath = url[len(oldparent):] + subpath = url[len(oldparent)+1:] newurl = _joinurl(newparent, subpath) # subpath usually gets / at begining return newurl -- cgit v1.2.1