Remove duplicates in the list of files passed to NSIS

This commit is contained in:
Latif Khalifa
2013-05-28 01:42:38 +02:00
parent ee1f1cdde2
commit fc80adaf7a

View File

@@ -348,6 +348,7 @@ class WindowsManifest(ViewerManifest):
result = ""
dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])]
dest_files = list(set(dest_files)) # remove duplicates
# sort deepest hierarchy first
dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b))
dest_files.reverse()