From e0fd866e9e3b3f09d106fb4aacbbf608eb08ca4c Mon Sep 17 00:00:00 2001 From: gravel Date: Sun, 10 Dec 2023 20:45:30 +0000 Subject: [PATCH] fix: update asset mtime on failed fetch --- php/assets/room-icons.php | 1 + php/assets/room-invites.php | 1 + 2 files changed, 2 insertions(+) diff --git a/php/assets/room-icons.php b/php/assets/room-icons.php index c3aef49..477b7aa 100644 --- a/php/assets/room-icons.php +++ b/php/assets/room-icons.php @@ -56,6 +56,7 @@ $icon = $icon_response ? curl_multi_getcontent($icon_response) : null; if (empty($icon)) { log_info("$room_id returned an empty icon."); + touch($icon_cached); } // Never overwrite with an empty file. if (!(file_exists($icon_cached) && filesize($icon_cached) > 0 && empty($icon))) { diff --git a/php/assets/room-invites.php b/php/assets/room-invites.php index 3405c40..2125a99 100644 --- a/php/assets/room-invites.php +++ b/php/assets/room-invites.php @@ -41,6 +41,7 @@ $png = $png_response ? curl_multi_getcontent($png_response) : null; if (empty($png)) { log_warning("$room_id returned an empty QR code."); + touch($png_cached); } // Never overwrite with an empty file. if (!(file_exists($png_cached) && filesize($png_cached) > 0 && empty($png))) {