mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Filter images starting by .
This commit is contained in:
parent
7777407c4b
commit
1c2a56ee8e
@ -40,11 +40,11 @@ def scan_for_images(type):
|
|||||||
for file in filenames:
|
for file in filenames:
|
||||||
path = os.path.join(root, file)
|
path = os.path.join(root, file)
|
||||||
if file not in files:
|
if file not in files:
|
||||||
if file.endswith(".md5sum"):
|
if file.endswith(".md5sum") or file.startswith("."):
|
||||||
continue
|
continue
|
||||||
elif (file.endswith(".image") and type == "dynamips") \
|
elif (file.endswith(".image") and type == "dynamips") \
|
||||||
or (file.endswith(".bin") and type == "iou") \
|
or (file.endswith(".bin") and type == "iou") \
|
||||||
or (not file.endswith(".bin") and not file.endswith(".image") and type == "qemu"):
|
or (not file.endswith(".bin") and not file.endswith(".image") and type == "qemu"):
|
||||||
files.add(file)
|
files.add(file)
|
||||||
paths.append(path)
|
paths.append(path)
|
||||||
return paths
|
return paths
|
||||||
|
Loading…
Reference in New Issue
Block a user