mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Preserve auto_start/auto_open/auto_close when restoring snapshot
Fixes #1904
This commit is contained in:
1 parent
150526b1ff
commit
c051367d4b
2 files changed
+8
-5
No files matched your search
@@ -121,7 +121,9 @@ class Snapshot:
|
||||
if os.path.exists(project_files_path):
|
||||
await wait_run_in_executor(shutil.rmtree, project_files_path)
|
||||
with open(self._path, "rb") as f:
|
||||
project = await import_project(self._project.controller, self._project.id, f, location=self._project.path)
|
||||
project = await import_project(self._project.controller, self._project.id, f, location=self._project.path,
|
||||
auto_start=self._project.auto_start, auto_open=self._project.auto_open,
|
||||
auto_close=self._project.auto_close)
|
||||
except (OSError, PermissionError) as e:
|
||||
raise aiohttp.web.HTTPConflict(text=str(e))
|
||||
await project.open()
|
||||
|
||||
Reference in new issue
Block a user