mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:57:08 +00:00
Use logical paths rather than physical
This commit is contained in:
@@ -95,7 +95,7 @@ class Datastore:
|
|||||||
cursor.execute(qry, (filepath,))
|
cursor.execute(qry, (filepath,))
|
||||||
results = cursor.fetchall()
|
results = cursor.fetchall()
|
||||||
if len(results):
|
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):
|
def add_file(self, path, cursor = None):
|
||||||
@@ -107,7 +107,8 @@ class Datastore:
|
|||||||
else:
|
else:
|
||||||
cur = cursor
|
cur = cursor
|
||||||
|
|
||||||
hash = file_hash(path)
|
realpath = configuration.translate_path(path)
|
||||||
|
hash = file_hash(realpath)
|
||||||
qry = "CALL add_file(%s, %s);"
|
qry = "CALL add_file(%s, %s);"
|
||||||
cur.execute(qry, (path, hash))
|
cur.execute(qry, (path, hash))
|
||||||
if cursor is None:
|
if cursor is None:
|
||||||
@@ -176,7 +177,7 @@ class Datastore:
|
|||||||
else:
|
else:
|
||||||
cur = cursor
|
cur = cursor
|
||||||
|
|
||||||
hash = file_hash(path)
|
hash = file_hash(configuration.translate_path(path))
|
||||||
qry = """
|
qry = """
|
||||||
UPDATE raw_lines rl
|
UPDATE raw_lines rl
|
||||||
SET ntbp = %s
|
SET ntbp = %s
|
||||||
|
|||||||
Reference in New Issue
Block a user