From 795c61216827c9e55902734407e0cf022a4ad014 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 19 May 2025 19:16:44 +0300 Subject: [PATCH] Stale artefact check now considers directory last modification time as well --- artefact.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artefact.inc.php b/artefact.inc.php index fbd73c2..cd1c46d 100644 --- a/artefact.inc.php +++ b/artefact.inc.php @@ -379,12 +379,12 @@ class TaskmanDirFiles implements \ArrayAccess, \Countable, \Iterator } } -function is_stale(string $file, iterable $deps) : bool +function is_stale(string $path, iterable $deps) : bool { - if(!is_file($file)) + if(!is_file($path) && !is_dir($path)) return true; - $fmtime = filemtime($file); + $fmtime = filemtime($path); foreach($deps as $dep) {