mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 12:13:26 +01:00
- Fix: DatabaseManager.migrateDatabaseToAppGroupIfNeeded() src and dest for replaceAt() cannot be same
This commit is contained in:
@@ -406,9 +406,12 @@ private extension DatabaseManager
|
|||||||
|
|
||||||
// Migrate apps
|
// Migrate apps
|
||||||
if FileManager.default.fileExists(atPath: previousAppsDirectoryURL.path, isDirectory: nil)
|
if FileManager.default.fileExists(atPath: previousAppsDirectoryURL.path, isDirectory: nil)
|
||||||
|
{
|
||||||
|
if(previousAppsDirectoryURL.path != appsDirectoryURL.path)
|
||||||
{
|
{
|
||||||
_ = try FileManager.default.replaceItemAt(appsDirectoryURL, withItemAt: previousAppsDirectoryURL)
|
_ = try FileManager.default.replaceItemAt(appsDirectoryURL, withItemAt: previousAppsDirectoryURL)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
finish(.success(()))
|
finish(.success(()))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user