mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-01 22:03:48 +02:00
Only check files (not directories) when looking for new images on file system.
This commit is contained in:
parent
5b478fc331
commit
b2ba561c0d
@ -90,7 +90,7 @@ async def get_computes(app: FastAPI) -> List[dict]:
|
|||||||
|
|
||||||
def image_filter(change: Change, path: str) -> bool:
|
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("."):
|
if path.endswith(".tmp") or path.endswith(".md5sum") or path.startswith("."):
|
||||||
return False
|
return False
|
||||||
header_magic_len = 7
|
header_magic_len = 7
|
||||||
|
Loading…
Reference in New Issue
Block a user