Don't add files to the DHT if a hash could not be found for them.
[quix0rs-apt-p2p.git] / apt_dht / CacheManager.py
index 517a0090f9a0fb10ea2627672488fea456c0b988..c70cee257fda9e0b83be04a085ceb41ecd926b16 100644 (file)
@@ -211,7 +211,7 @@ class CacheManager:
             if self.scanning[0] == self.cache_dir:
                 url = 'http:/' + file.path[len(self.cache_dir.path):]
             self.db.storeFile(file, result.digest())
-            df = self.manager.new_cached_file(file, result, url)
+            df = self.manager.new_cached_file(file, result, url, True)
             if df is None:
                 reactor.callLater(0, self._scanDirectories, None, walker)
             else: