From: Cameron Dale Date: Mon, 14 Jan 2008 07:24:39 +0000 (-0800) Subject: Remove the mirror name from the shared HTTP directory. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a56209828500fa8e177d897c7c72f9d1905883e;p=quix0rs-apt-p2p.git Remove the mirror name from the shared HTTP directory. --- diff --git a/apt_dht/CacheManager.py b/apt_dht/CacheManager.py index 3789eae..368714d 100644 --- a/apt_dht/CacheManager.py +++ b/apt_dht/CacheManager.py @@ -204,7 +204,8 @@ class CacheManager: else: log.msg('Hashed file to %s: %s' % (hash.hexdigest(), url)) - urlpath, newdir = self.db.storeFile(destFile, hash.digest(), self.cache_dir) + mirror_dir = self.cache_dir.child(destFile.path[len(self.cache_dir.path)+1:].split('/', 1)[0]) + urlpath, newdir = self.db.storeFile(destFile, hash.digest(), mirror_dir) log.msg('now avaliable at %s: %s' % (urlpath, url)) if newdir and self.manager: log.msg('A new web directory was created, so enable it')