mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 15:53:47 +00:00
Fix crash if you manually delete the project directory and use the delete button in interface
Fix #697
This commit is contained in:
@ -564,7 +564,10 @@ class Project:
|
||||
if self._status == "opened":
|
||||
yield from self.close()
|
||||
yield from self.delete_on_computes()
|
||||
shutil.rmtree(self.path)
|
||||
try:
|
||||
shutil.rmtree(self.path)
|
||||
except OSError as e:
|
||||
raise aiohttp.web.HTTPConflict(text="Can not delete project directory {}: {}".format(self.path, str(e)))
|
||||
|
||||
@asyncio.coroutine
|
||||
def delete_on_computes(self):
|
||||
|
Reference in New Issue
Block a user