aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys
diff options
context:
space:
mode:
Diffstat (limited to 'RepSys')
-rw-r--r--RepSys/mirror.py3
1 files changed, 1 insertions, 2 deletions
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