mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Experiment with settings
This commit is contained in:
@@ -25,10 +25,18 @@
|
||||
import Foundation
|
||||
import sqlcipher
|
||||
|
||||
private let ensureInitialized: Void = {
|
||||
sqlite3_initialize()
|
||||
|
||||
return Void()
|
||||
}()
|
||||
|
||||
public final class Database {
|
||||
internal var handle: OpaquePointer? = nil
|
||||
|
||||
public init?(_ location: String, readOnly: Bool) {
|
||||
let _ = ensureInitialized
|
||||
|
||||
if location != ":memory:" {
|
||||
let _ = open(location + "-guard", O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user