mirror of
https://github.com/MiSTer-devel/Distribution_MiSTer.git
synced 2026-05-17 03:03:37 +00:00
Update validation for MiSTer INI file content
This commit is contained in:
committed by
GitHub
parent
07b4a05ba5
commit
6284453684
4
.github/download_distribution.py
vendored
4
.github/download_distribution.py
vendored
@@ -849,8 +849,8 @@ def fetch_main_mister_file_from_commit(commit_sha, file_path) -> str:
|
||||
raise Exception(f"Error decoding {file_path}: {e}")
|
||||
|
||||
def validate_mister_ini(content):
|
||||
if not content.strip().startswith('[MiSTer]'):
|
||||
raise Exception("Fetched file does not start with [MiSTer] section")
|
||||
if '[mister]' not in content.lower():
|
||||
raise Exception("Fetched file does not contain [MiSTer] section")
|
||||
if len(content) < 100:
|
||||
raise Exception(f"File too small ({len(content)} bytes) - likely corrupted")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user