mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02: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:
1 file changed
+3
@@ -49,6 +49,9 @@ def import_project(controller, project_id, stream, location=None, name=None, kee
|
||||
: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:
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user