From 4e2287a2a44c533029076e69b0917d5952a2e38a Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 18 Oct 2019 16:23:01 +0000 Subject: [PATCH] Adapt 'fixpaths' to detect Windows paths and 'convert' them --- fixpaths.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fixpaths.py b/fixpaths.py index d4180d3..3fa1a27 100755 --- a/fixpaths.py +++ b/fixpaths.py @@ -18,6 +18,9 @@ def fix_paths(coverage_file): data.read_file(file_name) new_lines = {} for fname, report in data._lines.items(): + if fname.startswith('C:\\'): + # This is a Windows path, let's fudge it + fname = fname.replace('C:', '').replace('\\', '/') new_fname = os.path.join(base_path, fname.split('openlp/openlp/')[-1]) new_lines[new_fname] = report data._lines = new_lines