feat: when cancelling OS upgrade, delete any plugin files that were d… (#1823)

…ownloaded as part of the upgrade

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved cleanup of temporary plugin configuration files during update
cancellation operations.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
ljm42
2025-12-08 14:18:34 -07:00
committed by GitHub
parent 51f025b105
commit 74df938e45

View File

@@ -46,6 +46,11 @@ class UnraidUpdateCancel
$readmeContent .= "Unraid OS by [Lime Technology, Inc.](https://lime-technology.com).\n";
file_put_contents($readmeFile, $readmeContent);
// Delete plugin files that were downloaded during the OS upgrade
if (is_dir("/boot/config/plugins-nextboot")) {
shell_exec("rm -rf /boot/config/plugins-nextboot");
}
return ['success' => true]; // Upgrade handled successfully
} catch (\Throwable $th) {
return [