[Scummvm-git-logs] scummvm master -> 130270e9cc287afae5e70be52ac64e6f63873770
sev-
sev at scummvm.org
Sat Jul 31 15:04:27 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:
130270e9cc COMMON: Puny-encode '*', '[', ']' in file names
Commit: 130270e9cc287afae5e70be52ac64e6f63873770
https://github.com/scummvm/scummvm/commit/130270e9cc287afae5e70be52ac64e6f63873770
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-31T17:04:13+02:00
Commit Message:
COMMON: Puny-encode '*', '[', ']' in file names
Changed paths:
common/punycode.cpp
devtools/dumper-companion.pl
diff --git a/common/punycode.cpp b/common/punycode.cpp
index 4f7d46c60d..e0b9639026 100644
--- a/common/punycode.cpp
+++ b/common/punycode.cpp
@@ -304,7 +304,8 @@ String punycode_encodefilename(const String src) {
dst += '\x81';
dst += '\x79';
// [\x00-\x1f\/":]
- } else if (src[i] == '/' || src[i] == '"' || src[i] == ':' || (byte)src[i] < 0x20) {
+ } else if (src[i] == '/' || src[i] == '"' || src[i] == ':' || src[i] == '*'
+ src[i] == '[' || src[i] == ']' || (byte)src[i] < 0x20) {
dst += '\x81';
dst += (byte)src[i] + '\x80';
} else {
diff --git a/devtools/dumper-companion.pl b/devtools/dumper-companion.pl
index d749359582..c06bed70c0 100755
--- a/devtools/dumper-companion.pl
+++ b/devtools/dumper-companion.pl
@@ -420,8 +420,8 @@ sub encode_punycodefilename {
my $decfname = shift;
$decfname =~ s/\x81/\x81\x79/g;
- # escape non-printables, '/', '"' and ':'
- $decfname =~ s/([\x00-\x1f\/":])/\x81@{[chr(ord($1) + 0x80)]}/g;
+ # escape non-printables, '/', '"', '*', '[', ']' and ':'
+ $decfname =~ s/([\x00-\x1f\/":\*\[\]])/\x81@{[chr(ord($1) + 0x80)]}/g;
if ($decfname =~ /[\x80-\xff]/) {
$decfname = encode_punycode $decfname;
More information about the Scummvm-git-logs
mailing list