1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Only check files (not directories) when looking for new images on file system.

This commit is contained in:
grossmj 2022-07-16 12:11:26 +02:00
parent 5b478fc331
commit b2ba561c0d

View File

@ -90,7 +90,7 @@ async def get_computes(app: FastAPI) -> List[dict]:
def image_filter(change: Change, path: str) -> bool:
if change == Change.added:
if change == Change.added and os.path.isfile(path):
if path.endswith(".tmp") or path.endswith(".md5sum") or path.startswith("."):
return False
header_magic_len = 7