[Scummvm-git-logs] scummvm master -> c242dcbeb82f7d7b1798d48f6aa4a4ddf2491d5e

rvanlaar roland at rolandvanlaar.nl
Sun Aug 22 21:04:56 UTC 2021


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

Summary:
c242dcbeb8 DEVTOOLS: COMPANION: fix dir mode


Commit: c242dcbeb82f7d7b1798d48f6aa4a4ddf2491d5e
    https://github.com/scummvm/scummvm/commit/c242dcbeb82f7d7b1798d48f6aa4a4ddf2491d5e
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2021-08-22T23:04:07+02:00

Commit Message:
DEVTOOLS: COMPANION: fix dir mode

Last refactor left the dir mode in a broken state.
Thanks to @trembyle for spotting it.

Changed paths:
    devtools/dumper-companion.py


diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index c7832ba451..ab40bdca3e 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -279,7 +279,7 @@ def punyencode_paths(paths: List[Path], verbose: bool = False) -> int:
 
 def punyencode_arg(args: argparse.Namespace) -> int:
     """wrapper function"""
-    punyencode_dir(args.dir)
+    punyencode_dir(args.directory, verbose=True)
     return 0
 
 
@@ -289,8 +289,8 @@ def punyencode_dir(directory: Path, verbose: bool = False) -> int:
 
     Renames the leaves, i.e. files, first and the works it way up the tree by renaming the
     """
-    files: List[Path]
-    dirs: List[Path]
+    files: List[Path] = []
+    dirs: List[Path] = []
     for item in directory.glob("**"):
         if item.is_file():
             files.append(item)
@@ -402,7 +402,7 @@ def generate_parser() -> argparse.ArgumentParser:
         "dir", help="Punyencode all files and dirs in place"
     )
     parser_dir.add_argument("directory", metavar="directory ", type=Path, help="Path")
-    parser_dir.set_defaults(func=punyencode_dir)
+    parser_dir.set_defaults(func=punyencode_arg)
 
     parser_str = subparsers.add_parser("str", help="Punyencode strings or standard in")
     parser_str.add_argument(




More information about the Scummvm-git-logs mailing list