mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
fix: cached app after download was not respecting overriden appId/bundleId
This commit is contained in:
@@ -1320,7 +1320,8 @@ private extension AppManager
|
||||
|
||||
if cacheApp
|
||||
{
|
||||
try FileManager.default.copyItem(at: app.fileURL, to: InstalledApp.fileURL(for: app), shouldReplace: true)
|
||||
let updatedApp = AnyApp(from: app, bundleId: context.bundleIdentifier)
|
||||
try FileManager.default.copyItem(at: app.fileURL, to: InstalledApp.fileURL(for: updatedApp), shouldReplace: true)
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -38,7 +38,7 @@ final class DownloadAppOperation: ResultOperation<ALTApplication>
|
||||
self.context = context
|
||||
|
||||
self.appName = app.name
|
||||
self.bundleIdentifier = app.bundleIdentifier
|
||||
self.bundleIdentifier = context.bundleIdentifier
|
||||
self.sourceURL = app.url
|
||||
self.destinationURL = destinationURL
|
||||
|
||||
|
||||
@@ -32,6 +32,13 @@ public struct AnyApp: AppProtocol
|
||||
self.url = url
|
||||
self.storeApp = storeApp
|
||||
}
|
||||
|
||||
public init(from app: AppProtocol, name: String? = nil, bundleId: String? = nil, url: URL? = nil, storeApp: StoreApp? = nil) {
|
||||
self.name = name ?? app.name
|
||||
self.bundleIdentifier = bundleId ?? app.bundleIdentifier
|
||||
self.url = url ?? app.url
|
||||
self.storeApp = storeApp ?? app.storeApp
|
||||
}
|
||||
}
|
||||
|
||||
extension ALTApplication: AppProtocol
|
||||
|
||||
Reference in New Issue
Block a user