From 5dfb02cbd5d527e450ffaed60544ff34fa7a506c Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Mon, 23 Apr 2018 11:06:47 -0400 Subject: [PATCH] List only target paths containing forward slashes in metadata Signed-off-by: Vladimir Diaz --- tuf/repository_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuf/repository_lib.py b/tuf/repository_lib.py index 2330abbb..cbdc7aec 100755 --- a/tuf/repository_lib.py +++ b/tuf/repository_lib.py @@ -1397,7 +1397,7 @@ def generate_targets_metadata(targets_directory, target_files, version, if len(custom): custom_data = custom - filedict[relative_targetpath] = \ + filedict[relative_targetpath.replace('\\', '/').lstrip('/')] = \ get_metadata_fileinfo(target_path, custom_data) # Copy 'target_path' to 'digest_target' if consistent hashing is enabled.