]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Remove the mirror name from the shared HTTP directory.
authorCameron Dale <camrdale@gmail.com>
Mon, 14 Jan 2008 07:24:39 +0000 (23:24 -0800)
committerCameron Dale <camrdale@gmail.com>
Mon, 14 Jan 2008 07:24:39 +0000 (23:24 -0800)
apt_dht/CacheManager.py

index 3789eae679cc4ee236fa6df885785e29805b9249..368714d017d6856de43f8fb69f4d1ddb35f6e5d2 100644 (file)
@@ -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')