From 01674a4621a88b56c91ca3ad430a441cf6226c64 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Tue, 12 Jun 2007 18:36:37 +0000 Subject: Don't force "/" at the end of URLs --- RepSys/mirror.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'RepSys/mirror.py') diff --git a/RepSys/mirror.py b/RepSys/mirror.py index 29b8bf5..0c45c9e 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