[Scummvm-git-logs] scummvm master -> 2a802447d1bf090f07ad610182013f7f4a09dbb3

sev- noreply at scummvm.org
Fri Jul 11 11:33:07 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:
2a802447d1 DEVTOOLS: COMPANION: Punyencode ISO filenames on writing


Commit: 2a802447d1bf090f07ad610182013f7f4a09dbb3
    https://github.com/scummvm/scummvm/commit/2a802447d1bf090f07ad610182013f7f4a09dbb3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-07-11T13:33:01+02:00

Commit Message:
DEVTOOLS: COMPANION: Punyencode ISO filenames on writing

The previous code was doing it after the fact, which could potentially
lead to files with unallowed characters. Now we always write in
punycoded names (when requested)

Changed paths:
    devtools/dumper-companion.py


diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index 0d0b20b0f0e..3da7a45fbbb 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -542,13 +542,20 @@ def extract_volume_iso(args: argparse.Namespace) -> None:
 
     for dirname, dirlist, filelist in iso.walk(**arg):
         pwd = output_dir + dirname
+
         for dir in dirlist:
+            if dopunycode:
+                dir = punyencode(dir)
+
             joined_path = os.path.join(pwd, dir)
             if not dryrun:
                 os.makedirs(joined_path, exist_ok=True)
 
         for file in filelist:
             filename = file.split(";")[0]
+            if dopunycode:
+                filename = punyencode(filename)
+
             iso_file_path = os.path.join(dirname, file)
             out_file_path = os.path.join(pwd, filename)
             if not silent:
@@ -577,6 +584,9 @@ def extract_volume_iso(args: argparse.Namespace) -> None:
         pwd = output_dir + dirname
         # Set the modified time for directories
         for dir in dirlist:
+            if dopunycode:
+                dir = punyencode(dir)
+
             joined_path = os.path.join(pwd, dir)
             if not dryrun:
                 print(joined_path)
@@ -586,8 +596,6 @@ def extract_volume_iso(args: argparse.Namespace) -> None:
                                  rec.hour - rec.gmtoffset, rec.minute, rec.second, tzinfo=timezone.utc).timestamp()
                 os.utime(joined_path, (stamp, stamp))
 
-    if dopunycode:
-        punyencode_dir(Path(output_dir))
     iso.close()
 
 




More information about the Scummvm-git-logs mailing list