From fd241509a514404653e303927e784f72aa42a744 Mon Sep 17 00:00:00 2001 From: wrenge Date: Wed, 18 Dec 2024 08:06:04 +0300 Subject: [PATCH] Revert dir need regen support --- helpers.inc.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/helpers.inc.php b/helpers.inc.php index c1f03d8..e3f0a37 100644 --- a/helpers.inc.php +++ b/helpers.inc.php @@ -170,21 +170,15 @@ function json_make_pretty(string $json) : string function need_to_regen(string $file, array $deps, bool $debug = false) : bool { - if(is_file($file)) - { - $fmtime = filemtime($file); - } - else if(is_dir($file)) - { - $fmtime = filectime($file); - } - else + if(!is_file($file)) { if($debug) echo "! $file\n"; return true; } + $fmtime = filemtime($file); + foreach($deps as $dep) { if($dep && is_file($dep) && (filemtime($dep) > $fmtime))