Skip to content

Commit

Permalink
Merge pull request #276 from pannal/fix_#275_xml_json_broadness
Browse files Browse the repository at this point in the history
XML/JSON Correctly check for file extension
  • Loading branch information
razzeee authored Aug 16, 2024
2 parents c9143f9 + 2776575 commit 72cb95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kodi_addon_checker/check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def check_for_invalid_xml_files(report: Report, file_index: list):
addons
"""
for file in file_index:
if ".xml" in file["name"]:
if os.path.splitext(file["name"])[1].lower() == ".xml":
xml_path = os.path.join(file["path"], file["name"])
try:
# Just try if we can successfully parse it
Expand All @@ -39,7 +39,7 @@ def check_for_invalid_json_files(report: Report, file_index: list):
addons
"""
for file in file_index:
if ".json" in file["name"]:
if os.path.splitext(file["name"])[1].lower() == ".json":
path = os.path.join(file["path"], file["name"])
try:
# Just try if we can successfully parse it
Expand Down

0 comments on commit 72cb95b

Please sign in to comment.