From b2ba561c0d1dc3e2f4206bb3796b5def042c2ee0 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 16 Jul 2022 12:11:26 +0200 Subject: [PATCH] Only check files (not directories) when looking for new images on file system. --- gns3server/db/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/db/tasks.py b/gns3server/db/tasks.py index f6ec4125..48050eb7 100644 --- a/gns3server/db/tasks.py +++ b/gns3server/db/tasks.py @@ -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