Skip to content

Commit

Permalink
Fixed cache mirror directory end with a slash
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Oct 27, 2014
1 parent b883bca commit 4e1d6d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cygapt/cygapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self,
self.__rc.mirror = main_mirror;
self.__downloadDir = os.path.join(
self.__rc.cache,
urllib.quote(self.__rc.mirror, '').lower()
urllib.quote(self.__rc.mirror.rstrip('/')+'/', '').lower()
);

if (main_distname):
Expand Down Expand Up @@ -1244,7 +1244,7 @@ def getRessource(self, filename):
self.__rc.cache = self.__pm.mapPath(self.__rc.cache);
self.__downloadDir = os.path.join(
self.__rc.cache,
urllib.quote(self.__rc.mirror, '').lower()
urllib.quote(self.__rc.mirror.rstrip('/')+'/', '').lower()
);
self.__installedDbFile = os.path.join(self.__setupDir, "installed.db");

Expand Down
4 changes: 2 additions & 2 deletions src/cygapt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def setup(self, force=False):

setupIniPath = os.path.join(
self.__pm.mapPath(self.__rc.cache),
urllib.quote(self.__rc.mirror, '').lower(),
urllib.quote(self.__rc.mirror.rstrip('/')+'/', '').lower(),
self.__arch,
'setup.ini',
);
Expand Down Expand Up @@ -399,7 +399,7 @@ def update(self, cyg_apt_rc, verify, main_mirror=None):

downloads = os.path.join(
self.__pm.mapPath(self.__rc.cache),
urllib.quote(mirror, '').lower(),
urllib.quote(mirror.rstrip('/')+'/', '').lower(),
platform_dir,
);

Expand Down

0 comments on commit 4e1d6d7

Please sign in to comment.