diff --git a/bin/datastore.py b/bin/datastore.py index 0c16928..e6441d0 100644 --- a/bin/datastore.py +++ b/bin/datastore.py @@ -95,7 +95,7 @@ class Datastore: cursor.execute(qry, (filepath,)) results = cursor.fetchall() if len(results): - return (filepath, file_hash(filepath)) in results + return (filepath, file_hash(configuration.translate_path(filepath))) in results def add_file(self, path, cursor = None): @@ -107,7 +107,8 @@ class Datastore: else: cur = cursor - hash = file_hash(path) + realpath = configuration.translate_path(path) + hash = file_hash(realpath) qry = "CALL add_file(%s, %s);" cur.execute(qry, (path, hash)) if cursor is None: @@ -176,7 +177,7 @@ class Datastore: else: cur = cursor - hash = file_hash(path) + hash = file_hash(configuration.translate_path(path)) qry = """ UPDATE raw_lines rl SET ntbp = %s