From: Vincent Vanwaelscappel Date: Tue, 29 Mar 2022 12:24:35 +0000 (+0200) Subject: wip #5184 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=76947a8138e10add8ca94ff8ce95b0bbf2d61c18;p=cubist_util.git wip #5184 @0.25 --- diff --git a/src/Files/Files.php b/src/Files/Files.php index 5ebdaad..a67e62c 100644 --- a/src/Files/Files.php +++ b/src/Files/Files.php @@ -134,7 +134,8 @@ class Files { $do = true; - if (file_exists($to) && filemtime($from) === filemtime($to)) { + $frommtime = filemtime($from); + if (file_exists($to) && $frommtime === filemtime($to)) { if ($hashAlgo) { $do = hash_file($hashAlgo, $from) !== hash_file($hashAlgo, $from); } else { @@ -145,6 +146,7 @@ class Files return false; } copy($from, $to); + touch($to, $frommtime); return true; }