mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-03 13:48:11 +00:00
Raise an error if the destination of import contain a .gns3 in path
Ref https://github.com/GNS3/gns3-gui/issues/1503
This commit is contained in:
parent
84a2f8b4a3
commit
5b1ec3bec2
@ -49,6 +49,9 @@ def import_project(controller, project_id, stream, location=None, name=None, kee
|
|||||||
:returns: Project
|
:returns: Project
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if location and ".gns3" in location:
|
||||||
|
raise aiohttp.web.HTTPConflict(text="The destination path should not contain .gns3")
|
||||||
|
|
||||||
with zipfile.ZipFile(stream) as myzip:
|
with zipfile.ZipFile(stream) as myzip:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user