Commit c2d5b37fff3956b37f1d0907477eea286d7f650d

Thomas de Grivel 2023-03-11T04:14:12

mtime

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/rbpkg.rb b/lib/rbpkg.rb
index 2988cd0..f17da88 100644
--- a/lib/rbpkg.rb
+++ b/lib/rbpkg.rb
@@ -126,9 +126,12 @@ EOF
               file = "#{name}.log"
               if ! File.exist?(file) || File.mtime(file) <= File.mtime(subdir_file)
                 FileUtils.cp(subdir_file, file)
+                FileUtils.touch(file, mtime: File.mtime(subdir_file))
                 subdir_file_html = "#{subdir_file}.html"
                 if File.exist?(subdir_file_html)
-                  FileUtils.cp(subdir_file_html, "#{file}.html")
+                  file_html = "#{file}.html"
+                  FileUtils.cp(subdir_file_html, file_html)
+                  FileUtils.touch(file_html, mtime: File.mtime(subdir_file_html))
                   html = "#{d}/#{subdir_file_html}"
                 else
                   html = nil