mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-02-16 08:31:30 +00:00
aedi: BuildTarget.update_text_file()
restores modification time after write
the primary reason for this change is to avoid update of files at build step when these files were created at configuration step
This commit is contained in:
parent
06c741fbc1
commit
7dcef1dca4
1 changed files with 4 additions and 0 deletions
|
@ -131,9 +131,13 @@ class BuildTarget(Target):
|
|||
if content == patched_content:
|
||||
return
|
||||
|
||||
file_time = os.stat(path).st_mtime
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.writelines(patched_content)
|
||||
|
||||
os.utime(path, (file_time, file_time))
|
||||
|
||||
@staticmethod
|
||||
def _update_variables_file(path: Path, prefix_value: str,
|
||||
processor: typing.Optional[typing.Callable] = None, quotes: bool = True):
|
||||
|
|
Loading…
Reference in a new issue