mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
More specific path checks (file vs directory).
This commit is contained in:
1 parent
8020c2e99c
commit
96231e3f7f
8 files changed
+16
-16
No files matched your search
@@ -77,7 +77,7 @@ class Server(object):
|
||||
self._projects_dir = os.path.expandvars(os.path.expanduser(server_config.get("projects_directory", "~/Documents/GNS3/projects")))
|
||||
self._temp_dir = server_config.get("temporary_directory", tempfile.gettempdir())
|
||||
|
||||
if not os.path.exists(self._projects_dir):
|
||||
if not os.path.isdir(self._projects_dir):
|
||||
try:
|
||||
os.makedirs(self._projects_dir)
|
||||
log.info("projects directory '{}' created".format(self._projects_dir))
|
||||
|
||||
Reference in new issue
Block a user