Merge branch 'update-for-windows' into 'master'

Adapt 'fixpaths' to detect Windows paths and 'convert' them

See merge request openlp/runners!7
This commit is contained in:
Raoul Snyman 2019-10-18 16:23:01 +00:00
commit ef2872faaa
1 changed files with 3 additions and 0 deletions

View File

@ -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