From 0a56209828500fa8e177d897c7c72f9d1905883e Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sun, 13 Jan 2008 23:24:39 -0800 Subject: [PATCH] Remove the mirror name from the shared HTTP directory. --- apt_dht/CacheManager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- 2.39.2