More specific path checks (file vs directory).

This commit is contained in:
grossmj committed 2014-04-11 14:48:30 -06:00
1 parent 8020c2e99c
commit 96231e3f7f
8 files changed
+16 -16

No files matched your search

+1 -1
View File
@@ -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))