Change st_ctime to st_mtime

This commit is contained in:
Ines Montani 2019-09-12 15:35:01 +02:00
parent 4d4b3b0783
commit 0760c41393
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ def gzip_language_data(root, source):
base = Path(root) / source
for jsonfile in base.glob("**/*.json"):
outfile = jsonfile.with_suffix(jsonfile.suffix + ".gz")
if outfile.is_file() and outfile.stat().st_ctime > jsonfile.stat().st_ctime:
if outfile.is_file() and outfile.stat().st_mtime > jsonfile.stat().st_mtime:
# If the gz is newer it doesn't need updating
print("Skipping {}, already compressed".format(jsonfile))
continue