Merge pull request #148 from dkg/quotes

mvt-ios sqlite3 db recovery: fix quoting sent to sqlite3 .clone
This commit is contained in:
Nex 2021-08-03 09:31:43 +02:00 committed by GitHub
commit 6ef5b9d311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ class IOSExtraction(MVTModule):
bak_path = f"{file_path}.bak"
shutil.move(file_path, bak_path)
ret = subprocess.call(["sqlite3", bak_path, f".clone '{file_path}'"],
ret = subprocess.call(["sqlite3", bak_path, f".clone \"{file_path}\""],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if ret != 0:
raise DatabaseCorruptedError("Recovery of database failed")