From 7d01951bf305739a809b546df166128242baadd3 Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:33:53 +0530 Subject: [PATCH] - Fix: DatabaseManager.migrateDatabaseToAppGroupIfNeeded() src and dest for replaceAt() cannot be same --- AltStoreCore/Model/DatabaseManager.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AltStoreCore/Model/DatabaseManager.swift b/AltStoreCore/Model/DatabaseManager.swift index 690b42f14..7cbb9c785 100644 --- a/AltStoreCore/Model/DatabaseManager.swift +++ b/AltStoreCore/Model/DatabaseManager.swift @@ -407,7 +407,10 @@ private extension DatabaseManager // Migrate apps if FileManager.default.fileExists(atPath: previousAppsDirectoryURL.path, isDirectory: nil) { - _ = try FileManager.default.replaceItemAt(appsDirectoryURL, withItemAt: previousAppsDirectoryURL) + if(previousAppsDirectoryURL.path != appsDirectoryURL.path) + { + _ = try FileManager.default.replaceItemAt(appsDirectoryURL, withItemAt: previousAppsDirectoryURL) + } } finish(.success(()))