[Scummvm-git-logs] scummvm master -> 70e6f27f8eec77290712928baaf6c9fb32a63fa9

sev- noreply at scummvm.org
Mon Jun 30 09:38:44 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
70e6f27f8e DEVTOOLS: COMPANION: Preserve timestamps when dumping ISO


Commit: 70e6f27f8eec77290712928baaf6c9fb32a63fa9
    https://github.com/scummvm/scummvm/commit/70e6f27f8eec77290712928baaf6c9fb32a63fa9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-30T11:38:18+02:00

Commit Message:
DEVTOOLS: COMPANION: Preserve timestamps when dumping ISO

Changed paths:
    devtools/dumper-companion.py


diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index 6aa11d58397..a275f551972 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -26,6 +26,7 @@ import unicodedata
 import urllib.request
 import zipfile
 from binascii import crc_hqx
+from datetime import datetime, timezone
 from enum import Enum
 from io import BytesIO, IOBase, StringIO
 from pathlib import Path
@@ -546,6 +547,12 @@ def extract_volume_iso(args: argparse.Namespace) -> None:
             if not dryrun:
                 os.makedirs(joined_path, exist_ok=True)
 
+                arg[path_type] = os.path.join(dirname, dir)
+                rec = iso.get_record(**arg).date
+                stamp = datetime(rec.years_since_1900 + 1900, rec.month, rec.day_of_month,
+                                 rec.hour - rec.gmtoffset, rec.minute, rec.second, tzinfo=timezone.utc).timestamp()
+                os.utime(joined_path, (stamp, stamp))
+
         for file in filelist:
             filename = file.split(";")[0]
             iso_file_path = os.path.join(dirname, file)
@@ -561,6 +568,14 @@ def extract_volume_iso(args: argparse.Namespace) -> None:
                 arg[path_type] = iso_file_path
                 iso.get_file_from_iso_fp(outfp=f, **arg)
 
+                rec = iso.get_record(**arg).date
+                stamp = datetime(rec.years_since_1900 + 1900, rec.month, rec.day_of_month,
+                                 rec.hour - rec.gmtoffset, rec.minute, rec.second, tzinfo=timezone.utc).timestamp()
+
+                f.close()
+
+                os.utime(os.path.join(pwd, filename), (stamp, stamp))
+
     if dopunycode:
         punyencode_dir(Path(output_dir))
     iso.close()




More information about the Scummvm-git-logs mailing list