diff --git a/scripts/configuration.js b/scripts/configuration.js index 4af3773..a71b166 100644 --- a/scripts/configuration.js +++ b/scripts/configuration.js @@ -4876,7 +4876,7 @@ function backupsSettingsDescription(scheduledEnabled, keepCount) { const x = Math.max(1, Math.floor(Number(keepCount) || 5)); if (scheduledEnabled) { - return `KefinTweaks will backup your configuration once per day and keep up to ${x} previous backups. Backups are only created from an admin account that is logged in.`; + return `KefinTweaks will backup your configuration once per day and keep up to ${x} previous scheduled backups. Backups are only created from an admin account that is logged in.`; } return 'KefinTweaks will never automatically backup your configuration unless necessary during a migration task or other operations.'; } diff --git a/scripts/utils.js b/scripts/utils.js index 55fc81d..0f6275d 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -2660,8 +2660,13 @@ window.KefinTweaksConfig = ${JSON.stringify(config, null, 2)};`; try { const keep = Math.max(1, Math.floor(Number(keepCount) || DEFAULT_BACKUP_KEEP_COUNT)); const { pluginId, injectorConfig } = await fetchInjectorConfigForBackups(); + // Keep/prune applies only to scheduled backups; manual & skin-conflict are untouched const backups = (injectorConfig.CustomJavaScripts || []) - .filter((entry) => isKefinConfigScriptEntry(entry) && entry.Name !== KEFIN_CONFIG_ENTRY_NAME) + .filter((entry) => + isKefinConfigScriptEntry(entry) + && entry.Name !== KEFIN_CONFIG_ENTRY_NAME + && getBackupKindFromName(entry.Name) === 'scheduled' + ) .map((entry) => ({ entry, date: parseBackupTimestamp(entry.Name, entry.Script) @@ -2678,7 +2683,7 @@ window.KefinTweaksConfig = ${JSON.stringify(config, null, 2)};`; (entry) => !toRemove.has(entry.Name) ); await postInjectorConfig(pluginId, injectorConfig); - LOG(`Pruned ${toRemove.size} config backup(s); kept ${keep}`); + LOG(`Pruned ${toRemove.size} scheduled config backup(s); kept ${keep}`); return { pruned: toRemove.size }; } catch (err) { ERR('Error pruning config backups:', err);