diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-06-12 20:06:18 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-06-12 20:06:18 (GMT) |
commit | 7b9e1247764cad4ee556f6ca413760f46456cf2b (patch) | |
tree | ff55b254c736002333bdbf89021961e8d39eb7b8 /Tools/msi | |
parent | 329d7383802ef9e0b144fbc5349ad42a50dfeea7 (diff) | |
download | cpython-7b9e1247764cad4ee556f6ca413760f46456cf2b.zip cpython-7b9e1247764cad4ee556f6ca413760f46456cf2b.tar.gz cpython-7b9e1247764cad4ee556f6ca413760f46456cf2b.tar.bz2 |
Support file names which include '+' (for Tk 8.5).
Diffstat (limited to 'Tools/msi')
-rw-r--r-- | Tools/msi/msilib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py index 98571ac..d2f8764 100644 --- a/Tools/msi/msilib.py +++ b/Tools/msi/msilib.py @@ -333,6 +333,7 @@ def make_id(str): #str = str.replace(".", "_") # colons are allowed str = str.replace(" ", "_") str = str.replace("-", "_") + str = str.replace("+", "_") if str[0] in string.digits: str = "_"+str assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str @@ -477,6 +478,7 @@ class Directory: [(feature.id, component)]) def make_short(self, file): + file = re.sub(r'[\?|><:/*"+,;=\[\]]', '_', file) # restrictions on short names parts = file.split(".") if len(parts)>1: suffix = parts[-1].upper() @@ -505,7 +507,6 @@ class Directory: if pos in (10, 100, 1000): prefix = prefix[:-1] self.short_names.add(file) - assert not re.search(r'[\?|><:/*"+,;=\[\]]', file) # restrictions on short names return file def add_file(self, file, src=None, version=None, language=None): |