From 0b504f2a8cfb3e50289002fa49b51edb699de4c5 Mon Sep 17 00:00:00 2001 From: Hoang-Anh Nguyen Date: Tue, 11 Jun 2019 01:27:44 +0700 Subject: [PATCH] Fix issue #459: Wrong detection of Windows ISO, detect as memdisk_iso instead of Windows --- scripts/distro.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/distro.py b/scripts/distro.py index 1166255..f4729f8 100644 --- a/scripts/distro.py +++ b/scripts/distro.py @@ -212,7 +212,12 @@ def detect_iso_from_file_list(iso_file_list): filenames = [f.lower() for f in iso_file_list] for keys, distro in keys_to_distro: - if all(k in filenames for k in keys): + match = True + for k in keys: + if all(k not in fn for fn in filenames): + match = False + break + if match is True: return distro #log("Examined %d %s in the iso but could not determine the distro." # % (len(filenames), len(filenames)==1 and 'filename' or 'filenames'))