Removes temporary database backup on launch
This commit is contained in:
parent
cec169c9b2
commit
962d45e4f9
@ -62,13 +62,6 @@ extension DatabaseManager
|
||||
{
|
||||
guard !self.isStarted else { return }
|
||||
|
||||
do
|
||||
{
|
||||
if !FileManager.default.fileExists(atPath: DatabaseManager.backupDirectoryURL.path)
|
||||
{
|
||||
try FileManager.default.copyItem(at: DatabaseManager.defaultDirectoryURL(), to: DatabaseManager.backupDirectoryURL)
|
||||
}
|
||||
|
||||
self.loadPersistentStores { (description, error) in
|
||||
guard error == nil else { return completionHandler(error) }
|
||||
|
||||
@ -81,11 +74,6 @@ extension DatabaseManager
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
completionHandler(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - Update -
|
||||
@ -502,12 +490,6 @@ extension DatabaseManager
|
||||
let artworkURL = gameURL.deletingPathExtension().appendingPathExtension("jpg")
|
||||
return artworkURL
|
||||
}
|
||||
|
||||
class var backupDirectoryURL: URL
|
||||
{
|
||||
let backupDirectoryURL = FileManager.default.documentsDirectory.appendingPathComponent("Database-Backup")
|
||||
return backupDirectoryURL
|
||||
}
|
||||
}
|
||||
|
||||
//MARK: - Notifications -
|
||||
|
||||
Loading…
Reference in New Issue
Block a user