mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +00:00
Change default projects directory from ~/Documents/GNS3/projects to ~/GNS3/projects.
This commit is contained in:
parent
c9a729b369
commit
4b5c38495a
@ -44,7 +44,7 @@ class FileUploadHandler(tornado.web.RequestHandler):
|
|||||||
config = Config.instance()
|
config = Config.instance()
|
||||||
server_config = config.get_default_section()
|
server_config = config.get_default_section()
|
||||||
self._upload_dir = os.path.expandvars(
|
self._upload_dir = os.path.expandvars(
|
||||||
os.path.expanduser(server_config.get("upload_directory", "~/Documents/GNS3/images")))
|
os.path.expanduser(server_config.get("upload_directory", "~/GNS3/images")))
|
||||||
self._host = request.host
|
self._host = request.host
|
||||||
try:
|
try:
|
||||||
os.makedirs(self._upload_dir)
|
os.makedirs(self._upload_dir)
|
||||||
|
@ -79,8 +79,8 @@ class Server(object):
|
|||||||
# get the projects and temp directories from the configuration file (passed to the modules)
|
# get the projects and temp directories from the configuration file (passed to the modules)
|
||||||
config = Config.instance()
|
config = Config.instance()
|
||||||
server_config = config.get_default_section()
|
server_config = config.get_default_section()
|
||||||
# default projects directory is "~/Documents/GNS3/projects"
|
# default projects directory is "~/GNS3/projects"
|
||||||
self._projects_dir = os.path.expandvars(os.path.expanduser(server_config.get("projects_directory", "~/Documents/GNS3/projects")))
|
self._projects_dir = os.path.expandvars(os.path.expanduser(server_config.get("projects_directory", "~/GNS3/projects")))
|
||||||
self._temp_dir = server_config.get("temporary_directory", tempfile.gettempdir())
|
self._temp_dir = server_config.get("temporary_directory", tempfile.gettempdir())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user