mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
Remove linphone.db file if it exists
This commit is contained in:
parent
896a908f3f
commit
3d6338effa
1 changed files with 5 additions and 0 deletions
|
|
@ -155,6 +155,8 @@ final class CoreContext: ObservableObject {
|
|||
|
||||
self.mCore.imdnToEverybodyThreshold = 1
|
||||
|
||||
//self.copyDatabaseFileToDocumentsDirectory()
|
||||
|
||||
let shortcutsCount = self.mCore.config!.getInt(section: "ui", key: "shortcut_count", defaultValue: 0)
|
||||
if shortcutsCount > 0 {
|
||||
var shortcuts: [ShortcutModel] = []
|
||||
|
|
@ -440,6 +442,9 @@ final class CoreContext: ObservableObject {
|
|||
let directory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first
|
||||
if directory != nil {
|
||||
do {
|
||||
if FileManager.default.fileExists(atPath: directory!.appendingPathComponent("linphone.db").path) {
|
||||
try FileManager.default.removeItem(at: directory!.appendingPathComponent("linphone.db"))
|
||||
}
|
||||
try FileManager.default.copyItem(at: rcFileUrl, to: directory!.appendingPathComponent("linphone.db"))
|
||||
} catch {
|
||||
print("Error: ", error)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue