@@ -308,18 +308,15 @@ def wfp_for_contents(self, file: str, bin_file: bool, contents: bytes) -> str:
308
308
return ''
309
309
# Print file line
310
310
content_length = len (contents )
311
- wfp_filename = repr (file ).strip ("'" ) # return a utf-8 compatible version of the filename
312
- if (
313
- self .obfuscate
314
- ): # hide the real size of the file and its name, but keep the suffix
315
- wfp_filename = f'{ self .ob_count } { pathlib .Path (file ).suffix } '
316
- if platform .system () == "Windows" :
317
- wfp_filename = wfp_filename .replace ("\\ " , "/" )
318
- file = file .replace ("\\ " , "/" )
311
+ original_filename = file
312
+
313
+ if platform .system () == 'Windows' :
314
+ original_filename = file .replace ('\\ ' , '/' )
315
+ wfp_filename = repr (original_filename ).strip ("'" ) # return a utf-8 compatible version of the filename
316
+ if self .obfuscate : # hide the real size of the file and its name, but keep the suffix
317
+ wfp_filename = f'{ self .ob_count } { pathlib .Path (original_filename ).suffix } '
319
318
self .ob_count = self .ob_count + 1
320
- self .file_map [wfp_filename ] = (
321
- file # Save the file name map for later (reverse lookup)
322
- )
319
+ self .file_map [wfp_filename ] = original_filename # Save the file name map for later (reverse lookup)
323
320
324
321
wfp = 'file={0},{1},{2}\n ' .format (file_md5 , content_length , wfp_filename )
325
322
# We don't process snippets for binaries, or other uninteresting files, or if we're requested to skip
0 commit comments