mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 00:08:11 +00:00
SIGHUP: remove projects with an empty project directory.
This commit is contained in:
parent
0b854ffceb
commit
56c25727b6
@ -148,7 +148,7 @@ class Controller:
|
|||||||
|
|
||||||
# remove all projects deleted from disk.
|
# remove all projects deleted from disk.
|
||||||
for project in self._projects.copy().values():
|
for project in self._projects.copy().values():
|
||||||
if not os.path.exists(project.path):
|
if not os.path.exists(project.path) or not os.listdir(project.path):
|
||||||
log.info(f"Project '{project.name}' doesn't exist on the disk anymore, closing...")
|
log.info(f"Project '{project.name}' doesn't exist on the disk anymore, closing...")
|
||||||
await project.close()
|
await project.close()
|
||||||
self.remove_project(project)
|
self.remove_project(project)
|
||||||
|
Loading…
Reference in New Issue
Block a user