Skip to content

Commit

Permalink
Merge pull request #119 from fosslight/develop
Browse files Browse the repository at this point in the history
Replace windows operator to '/' for path in yaml
  • Loading branch information
bjk7119 authored Nov 18, 2022
2 parents a12d6f1 + 9bb88af commit 76eb5fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/fosslight_prechecker/_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import io
import sys
import platform
import yaml
import fnmatch
import xml.etree.ElementTree as ET
Expand All @@ -24,6 +25,7 @@
MSG_FOLLOW_LIC_TXT = "Follow the Copyright and License Writing Rules in Source Code. : " + RULE_LINK
EX_IOERR = 74
logger = logging.getLogger(constant.LOGGER_NAME)
is_windows = platform.system() == 'Windows'


class ResultItem:
Expand Down Expand Up @@ -216,7 +218,10 @@ def create_result_file(output_file_name, format='', _start_time=""):


def get_path_in_yaml(oss_item):
return [os.path.join(oss_item.relative_path, file) for file in oss_item.source_name_or_path]
path_in_yaml = [os.path.join(oss_item.relative_path, file) for file in oss_item.source_name_or_path]
if is_windows:
path_in_yaml = [path.replace(os.sep, '/') for path in path_in_yaml]
return path_in_yaml


def extract_files_in_path(remove_file_list, base_file_list, return_found=False):
Expand Down

0 comments on commit 76eb5fd

Please sign in to comment.