escape file
This commit is contained in:
parent
51517f5212
commit
3d3fb25d78
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ class find_duplicate_files:
|
|||
self.cache_db.commit()
|
||||
|
||||
def _check_file_cache(self, file):
|
||||
result = self.cur.execute(f"SELECT hash FROM files WHERE file = '{file}'")
|
||||
file_sql = file.replace("'", "\'")
|
||||
result = self.cur.execute(f"SELECT hash FROM files WHERE file = '{file_sql}'")
|
||||
row = result.fetchone()
|
||||
if row and len(row) > 0:
|
||||
return row[0]
|
||||
|
|
Loading…
Reference in a new issue