From 8c70b84d9225eac5c9bb72d92959eb5b011484bb Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 28 Mar 2010 20:43:20 +0200 Subject: [PATCH] source.ipfire.org: Fix hashing functions. --- www/webapp/db.py | 3 +++ www/webapp/handlers.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www/webapp/db.py b/www/webapp/db.py index 8d816140..1f08817e 100644 --- a/www/webapp/db.py +++ b/www/webapp/db.py @@ -8,6 +8,9 @@ import os.path class HashDatabase(object): def __init__(self): self.conn = sqlite3.connect("/srv/www/ipfire.org/source/hashes.db") + self.conn.isolation_level = None # autocommit mode + + self.prepare() def __del__(self): self.conn.close() diff --git a/www/webapp/handlers.py b/www/webapp/handlers.py index b2704a43..3063c462 100644 --- a/www/webapp/handlers.py +++ b/www/webapp/handlers.py @@ -227,7 +227,7 @@ class SourceHandler(BaseHandler): if file in [f["name"] for f in fileobjects]: continue - hash = self.hash_db.get_hash(file) + hash = self.hash_db.get_hash(os.path.join(dir, file) if not hash: hash = "0000000000000000000000000000000000000000" -- 2.47.3