From 119b551afd2a3fec2ede8bcb98e100b4b9233625 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 10 Apr 2019 12:59:51 -0700 Subject: [PATCH] Use md5 hashes instead of the file name and path --- builders/windows-builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builders/windows-builder.py b/builders/windows-builder.py index 88ae839..7ebb43c 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -112,6 +112,7 @@ import os import glob import sys from distutils import dir_util +from hashlib import md5 from shutil import copy, move, rmtree from lxml.etree import fromstring, tostring @@ -171,7 +172,7 @@ class WindowsBuilder(Builder): if fname in BLACKLIST: continue source = os.path.join(path, fname) if path else fname - source_id = source.replace('-', '_').replace(os.sep, '_') + source_id = md5(source).hexdigest() file_id = 'file_{source_id}'.format(source_id=source_id) component_id = 'cmp_{source_id}'.format(source_id=source_id) file_ = E.File(Id=file_id, KeyPath="yes", Source=source)