mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Allow using "@" symbols in PNG files names
This is needed when dealing with @2x versions of the files.
This commit is contained in:
@@ -25,6 +25,9 @@ if len(sys.argv) < 2:
|
||||
|
||||
r = re.compile("^([a-zA-Z._][a-zA-Z._0-9]*)[.][pP][nN][gG]$")
|
||||
|
||||
# Automatically replace some symbols in the filenames.
|
||||
sanitize = str.maketrans('-@', '__')
|
||||
|
||||
with_size = 0
|
||||
size_suffix = ''
|
||||
for path in sys.argv[1:]:
|
||||
@@ -32,7 +35,7 @@ for path in sys.argv[1:]:
|
||||
with_size = 1
|
||||
continue
|
||||
|
||||
filename = os.path.basename(path).replace('-','_')
|
||||
filename = os.path.basename(path).translate(sanitize)
|
||||
m = r.match(filename)
|
||||
|
||||
# Allow only filenames that make sense as C variable names
|
||||
|
||||
Reference in New Issue
Block a user