From 1c2a56ee8ef7612cd558c898c67e4580fb26ace3 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 18 Aug 2016 19:29:09 +0200 Subject: [PATCH] Filter images starting by . --- gns3server/utils/images.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/utils/images.py b/gns3server/utils/images.py index 5b63e7af..455f21e0 100644 --- a/gns3server/utils/images.py +++ b/gns3server/utils/images.py @@ -40,11 +40,11 @@ def scan_for_images(type): for file in filenames: path = os.path.join(root, file) if file not in files: - if file.endswith(".md5sum"): + if file.endswith(".md5sum") or file.startswith("."): continue elif (file.endswith(".image") and type == "dynamips") \ - or (file.endswith(".bin") and type == "iou") \ - or (not file.endswith(".bin") and not file.endswith(".image") and type == "qemu"): + or (file.endswith(".bin") and type == "iou") \ + or (not file.endswith(".bin") and not file.endswith(".image") and type == "qemu"): files.add(file) paths.append(path) return paths