[Scummvm-git-logs] scummvm master -> 954e1d61db00711e32fcae0277060b6873a48a46
aquadran
aquadran at gmail.com
Thu Nov 11 23:18:45 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0a3af55866 DEVTOOLS: fix overeager ArgumentError catch
915826fda5 DEVTOOLS: mac mode operates on raw byte paths
954e1d61db DEVTOOLS: add a new filename to test_decode_name
Commit: 0a3af5586672f85f71c0fb5fa9131f0abc6579b5
https://github.com/scummvm/scummvm/commit/0a3af5586672f85f71c0fb5fa9131f0abc6579b5
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2021-11-12T00:18:41+01:00
Commit Message:
DEVTOOLS: fix overeager ArgumentError catch
Changed paths:
devtools/dumper-companion.py
diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index 6557e1cafb..3a592c33c8 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -484,9 +484,10 @@ if __name__ == "__main__":
parser = generate_parser()
args = parser.parse_args()
try:
- exit(args.func(args))
+ f = args.func
except AttributeError:
parser.error("too few arguments")
+ exit(f(args))
### Test functions
Commit: 915826fda5c8e66f02e0f360eef940f4b0f95bf8
https://github.com/scummvm/scummvm/commit/915826fda5c8e66f02e0f360eef940f4b0f95bf8
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2021-11-12T00:18:41+01:00
Commit Message:
DEVTOOLS: mac mode operates on raw byte paths
Changed paths:
devtools/dumper-companion.py
diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index 3a592c33c8..aa582ece0a 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -347,14 +347,14 @@ def punyencode_dir(directory: Path, verbose: bool = False) -> int:
return count
-def has_resource_fork(dirpath: str, filename: str) -> bool:
+def has_resource_fork(dirpath: bytes, filename: bytes) -> bool:
"""
Check if file has a resource fork
Ease of compatibility between macOS and linux
"""
filepath = os.path.join(dirpath, filename)
- return os.path.exists(os.path.join(filepath, "..namedfork/rsrc"))
+ return os.path.exists(os.path.join(filepath, bytes("..namedfork/rsrc", "utf8")))
def collect_forks(args: argparse.Namespace) -> int:
@@ -364,7 +364,7 @@ def collect_forks(args: argparse.Namespace) -> int:
- combine them with the data fork when it's available
- punyencode the filename when requested
"""
- directory: Path = args.dir
+ directory: bytes = bytes(args.dir)
punify: bool = args.punycode
count_resources = 0
count_renames = 0
@@ -373,7 +373,7 @@ def collect_forks(args: argparse.Namespace) -> int:
if has_resource_fork(dirpath, filename):
print(f"Resource in {filename}")
count_resources += 1
- resource_filename = filename + "/..namedfork/rsrc"
+ resource_filename = filename + bytes("/..namedfork/rsrc", "utf8")
to_filename = filename
filepath = os.path.join(dirpath, filename)
@@ -400,7 +400,7 @@ def collect_forks(args: argparse.Namespace) -> int:
with open(filepath, "rb") as data:
file.data = data.read()
with open(filepath, "wb") as to_file:
- to_file.write(file_to_macbin(file, to_filename.encode("mac_roman")))
+ to_file.write(file_to_macbin(file, to_filename))
if to_filename != filename:
os.remove(filepath) # Remove the original file
Commit: 954e1d61db00711e32fcae0277060b6873a48a46
https://github.com/scummvm/scummvm/commit/954e1d61db00711e32fcae0277060b6873a48a46
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2021-11-12T00:18:41+01:00
Commit Message:
DEVTOOLS: add a new filename to test_decode_name
Changed paths:
devtools/dumper-companion.py
diff --git a/devtools/dumper-companion.py b/devtools/dumper-companion.py
index aa582ece0a..651b73eccb 100755
--- a/devtools/dumper-companion.py
+++ b/devtools/dumper-companion.py
@@ -550,6 +550,7 @@ def test_decode_name():
["G3ãã©ã«ã", "xn--G3-3g4axdtexf"],
["Where \\ Do <you> Want / To: G* ? ;Unless=nowhere,or|\"(everything)/\":*|\\?%<>,;=", "xn--Where Do you Want To G ;Unless=nowhere,or(everything),;=-5baedgdcbtamaaaaaaaaa99woa3wnnmb82aqb71ekb9g3c1f1cyb7bx6rfcv2pxa"],
["Buried in Timeェ Demo", "xn--Buried in Time Demo-yp97h"],
+ ["ã±ãããPPC", "xn--PPC-873bpbxa3l"]
]
for input, output in checks:
assert punyencode(input) == output
More information about the Scummvm-git-logs
mailing list