From: Michael Tremer Date: Sun, 28 Mar 2010 18:43:20 +0000 (+0200) Subject: source.ipfire.org: Fix hashing functions. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c70b84d9225eac5c9bb72d92959eb5b011484bb;p=ipfire.org.git source.ipfire.org: Fix hashing functions. --- 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"