summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-07-06 19:28:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-07-06 19:28:03 (GMT)
commit388a8c26fae0c9fdce06fcf69223b7b43cb25acf (patch)
treecc2a9648cb71a5680524c0786b8a178671d66d09 /Lib
parentb9aa7ea66017a9829455e0c2c10d383a53b46873 (diff)
downloadcpython-388a8c26fae0c9fdce06fcf69223b7b43cb25acf.zip
cpython-388a8c26fae0c9fdce06fcf69223b7b43cb25acf.tar.gz
cpython-388a8c26fae0c9fdce06fcf69223b7b43cb25acf.tar.bz2
Properly generate logical file ids. Fixes #1515998.
Also correct typo in Control.mapping.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/msilib/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/msilib/__init__.py b/Lib/msilib/__init__.py
index 0881409..4be82b0 100644
--- a/Lib/msilib/__init__.py
+++ b/Lib/msilib/__init__.py
@@ -187,7 +187,7 @@ class CAB:
self.filenames = sets.Set()
self.index = 0
- def gen_id(self, dir, file):
+ def gen_id(self, file):
logical = _logical = make_id(file)
pos = 1
while logical in self.filenames:
@@ -196,9 +196,11 @@ class CAB:
self.filenames.add(logical)
return logical
- def append(self, full, logical):
+ def append(self, full, file, logical):
if os.path.isdir(full):
return
+ if not logical:
+ logical = self.gen_id(file)
self.index += 1
self.files.append((full, logical))
return self.index, logical
@@ -328,7 +330,7 @@ class Directory:
logical = self.keyfiles[file]
else:
logical = None
- sequence, logical = self.cab.append(absolute, logical)
+ sequence, logical = self.cab.append(absolute, file, logical)
assert logical not in self.ids
self.ids.add(logical)
short = self.make_short(file)
@@ -403,7 +405,7 @@ class Control:
[(self.dlg.name, self.name, event, argument,
condition, ordering)])
- def mapping(self, mapping, attribute):
+ def mapping(self, event, attribute):
add_data(self.dlg.db, "EventMapping",
[(self.dlg.name, self.name, event, attribute)])