escape quotes
This commit is contained in:
parent
8e7dc7d756
commit
4d9f0e58a4
1 changed files with 2 additions and 1 deletions
|
@ -64,7 +64,8 @@ class find_duplicate_files:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _cache_file(self, file, hash):
|
def _cache_file(self, file, hash):
|
||||||
result = self.cur.execute(f"INSERT INTO files (hash, file) VALUES ('{file}', '{hash}')")
|
file_sql = file.replace("'", "\'")
|
||||||
|
result = self.cur.execute(f"INSERT INTO files (hash, file) VALUES ('{file_sql}', '{hash}')")
|
||||||
self.cache_db.commit()
|
self.cache_db.commit()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue