fix(extension-store): Migrate to extension store during restore/sync legacy backup (#1746)
This commit is contained in:
parent
da57b3db07
commit
ce6a0ea7fa
1 changed files with 8 additions and 1 deletions
|
|
@ -12,8 +12,15 @@ class ExtensionStoreRestorer(
|
||||||
suspend operator fun invoke(
|
suspend operator fun invoke(
|
||||||
backupStore: BackupExtensionStore,
|
backupStore: BackupExtensionStore,
|
||||||
) {
|
) {
|
||||||
|
// KMK -->
|
||||||
|
val indexUrl = if (backupStore.isLegacy == null) {
|
||||||
|
backupStore.indexUrl.removeSuffix("/index.min.json").removeSuffix("/index.json") + "/repo.json"
|
||||||
|
} else {
|
||||||
|
backupStore.indexUrl
|
||||||
|
}
|
||||||
|
// KMK <--
|
||||||
database.extension_storeQueries.upsert(
|
database.extension_storeQueries.upsert(
|
||||||
indexUrl = backupStore.indexUrl,
|
indexUrl = indexUrl,
|
||||||
name = backupStore.name,
|
name = backupStore.name,
|
||||||
badgeLabel = backupStore.badgeLabel ?: backupStore.name,
|
badgeLabel = backupStore.badgeLabel ?: backupStore.name,
|
||||||
signingKey = backupStore.signingKey,
|
signingKey = backupStore.signingKey,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue