Skip to content

Commit 9f1d6ac

Browse files
committed
check bug notice
Signed-off-by: Ethan Lee <[email protected]>
1 parent 40c1f8b commit 9f1d6ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/fosslight_android/check_notice_file.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def read_notice_file(notice_file_path, notice_html_file):
102102
encodings = ["latin-1", "utf-8", "utf-16"]
103103
notice_files = []
104104

105+
'''
105106
if notice_html_file != "":
106107
notice_files = notice_html_file.split(",")
107108
else:
@@ -115,6 +116,19 @@ def read_notice_file(notice_file_path, notice_html_file):
115116
if len(additional_notice_files) > 0:
116117
notice_files.extend(additional_notice_files)
117118
notice_files = list(set(notice_files))
119+
'''
120+
121+
if os.path.isfile(notice_file_path):
122+
notice_files.append(notice_file_path)
123+
if notice_file_path.endswith(".html") or notice_file_path.endswith(".xml") or notice_file_path.endswith(".txt"):
124+
notice_file_path = os.path.dirname(notice_file_path)
125+
126+
if os.path.isdir(notice_file_path):
127+
additional_notice_files = find_files_by_extension(notice_file_path)
128+
if len(additional_notice_files) > 0:
129+
notice_files.extend(additional_notice_files)
130+
notice_files = list(set(notice_files))
131+
118132

119133
for file_name in notice_files:
120134
file_list = {}

0 commit comments

Comments
 (0)