From 13eb461dfe67c80f3c97e83820006ede17c20367 Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 8 May 2015 18:30:41 -0600 Subject: [PATCH] Update default VMware VM location path for OSX. --- gns3server/modules/vmware/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/vmware/__init__.py b/gns3server/modules/vmware/__init__.py index f7fb69f0..9219db60 100644 --- a/gns3server/modules/vmware/__init__.py +++ b/gns3server/modules/vmware/__init__.py @@ -174,10 +174,13 @@ class VMware(BaseManager): # TODO: default location can be changed in the preferences file (prefvmx.defaultvmpath = "path") # Windows: %APPDATA%\Vmware\preferences.ini # Linux: ~/.vmware/preferences + # OSX: ~/Library/Preferences/VMware Fusion/preferences if sys.platform.startswith("win"): default_vm_path = os.path.expandvars(r"%USERPROFILE%\Documents\Virtual Machines") + elif sys.platform.startswith("darwin"): + default_vm_path = os.path.expanduser("~/Documents/Virtual Machines.localized") else: - default_vm_path = os.path.expanduser("~/vmware") # FIXME: check if correct path on OSX + default_vm_path = os.path.expanduser("~/vmware") if os.path.isdir(default_vm_path): return self._get_vms_from_default_folder(default_vm_path) log.warning("Default VMware VM location doesn't exist: {}".format(default_vm_path))