From 4dbbc8e8ac0a56213e35de0aa32d40dbdaf71eee Mon Sep 17 00:00:00 2001 From: henderkes Date: Thu, 1 Jan 2026 14:51:02 +0100 Subject: [PATCH] update the updated sources file instead of overwriting it --- src/SPC/command/DownloadCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SPC/command/DownloadCommand.php b/src/SPC/command/DownloadCommand.php index 17cb7e42..ed1b965c 100644 --- a/src/SPC/command/DownloadCommand.php +++ b/src/SPC/command/DownloadCommand.php @@ -519,6 +519,11 @@ class DownloadCommand extends BaseCommand // Write updated sources to file $date = date('Y-m-d'); $update_file = DOWNLOAD_PATH . '/.update-' . $date . '.txt'; + if (file_exists($update_file)) { + $existing_content = file_get_contents($update_file); + $existing_sources = array_map('trim', explode(',', $existing_content)); + $updated_sources = array_unique(array_merge($existing_sources, $updated_sources)); + } $content = implode(',', $updated_sources); file_put_contents($update_file, $content); logger()->debug("Updated sources written to: {$update_file}");