1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Catch error if you export a project deleted from disk

Fix #793
This commit is contained in:
Julien Duponchelle 2016-11-25 17:18:23 +01:00
parent 9b6b989d1b
commit 40263e14ca
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -49,6 +49,9 @@ def export_project(project, temporary_dir, include_images=False, keep_compute_id
z = zipstream.ZipFile(allowZip64=True)
if not os.path.exists(project._path):
raise aiohttp.web.HTTPNotFound(text="The project doesn't exist at location {}".format(project._path))
# First we process the .gns3 in order to be sure we don't have an error
for file in os.listdir(project._path):
if file.endswith(".gns3"):