Extra validation of the uploaded ZIP #73

Merged
Anna Sirota merged 13 commits from validation-single-theme-xml into main 2024-04-11 12:32:50 +02:00
Showing only changes of commit d4eac920fe - Show all commits

View File

@ -72,13 +72,11 @@ def find_full_path(
def filter_paths_by_ext(paths: typing.List[str], ext: str) -> typing.Iterable[str]:
"""Generate a list of paths having a given extension from a given list of paths."""
for file_path in paths:
# Remove leading/trailing whitespace from file path
file_path_stripped = file_path.strip()
# Get file path's extension
_, file_path_ext = os.path.splitext(file_path_stripped)
_, file_path_ext = os.path.splitext(file_path)
# Check if this file's extension matches the extension we are looking for
if file_path_ext.lower() == ext.lower():
yield file_path_stripped
yield file_path
def read_manifest_from_zip(archive_path):