mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Try one more time after deleting corrupted database
This commit is contained in:
parent
cfff49d6c0
commit
1aa0d30a08
@ -363,7 +363,14 @@ public final class SqliteValueBox: ValueBox {
|
||||
for fileName in dabaseFileNames {
|
||||
let _ = try? FileManager.default.removeItem(atPath: basePath + "/\(fileName)")
|
||||
}
|
||||
database = Database(path, readOnly: false)!
|
||||
|
||||
let maybeDatabase = Database(path, readOnly: false)
|
||||
if let maybeDatabase = maybeDatabase {
|
||||
database = maybeDatabase
|
||||
} else {
|
||||
let _ = try? FileManager.default.removeItem(atPath: path)
|
||||
database = Database(path, readOnly: false)!
|
||||
}
|
||||
|
||||
resultCode = database.execute("PRAGMA cipher_plaintext_header_size=32")
|
||||
assert(resultCode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user