Raise an error if the destination of import contain a .gns3 in path

Ref https://github.com/GNS3/gns3-gui/issues/1503
pull/712/head
Julien Duponchelle 8 years ago
parent 84a2f8b4a3
commit 5b1ec3bec2
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -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:

Loading…
Cancel
Save