mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-11 20:59:03 +01:00
Preserve modification time for is_copy=True
This commit is contained in:
parent
b639668c3b
commit
73e7568165
@ -715,6 +715,8 @@ class subst_pc(Task.Task):
|
||||
if getattr(self.generator, 'is_copy', None):
|
||||
for i, x in enumerate(self.outputs):
|
||||
x.write(self.inputs[i].read('rb'), 'wb')
|
||||
stat = os.stat(self.inputs[i].abspath()) # Preserve mtime of the copy
|
||||
os.utime(self.outputs[i].abspath(), (stat.st_atime, stat.st_mtime))
|
||||
self.force_permissions()
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user