mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Move data cleanup to background
This commit is contained in:
parent
eaa582c78c
commit
e6aad302dc
@ -189,6 +189,7 @@ public func rootPathForBasePath(_ appGroupPath: String) -> String {
|
||||
}
|
||||
|
||||
public func performAppGroupUpgrades(appGroupPath: String, rootPath: String) {
|
||||
DispatchQueue.global(qos: .default).async {
|
||||
let _ = try? FileManager.default.createDirectory(at: URL(fileURLWithPath: rootPath), withIntermediateDirectories: true, attributes: nil)
|
||||
|
||||
if let items = FileManager.default.enumerator(at: URL(fileURLWithPath: appGroupPath), includingPropertiesForKeys: [.isDirectoryKey], options: [.skipsHiddenFiles, .skipsSubdirectoryDescendants], errorHandler: nil) {
|
||||
@ -208,6 +209,7 @@ public func performAppGroupUpgrades(appGroupPath: String, rootPath: String) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
var resourceValues = URLResourceValues()
|
||||
|
Loading…
x
Reference in New Issue
Block a user