mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 13:23:10 +00:00
Update default VMware VM location path for OSX.
This commit is contained in:
parent
00fa1cc370
commit
13eb461dfe
@ -174,10 +174,13 @@ class VMware(BaseManager):
|
|||||||
# TODO: default location can be changed in the preferences file (prefvmx.defaultvmpath = "path")
|
# TODO: default location can be changed in the preferences file (prefvmx.defaultvmpath = "path")
|
||||||
# Windows: %APPDATA%\Vmware\preferences.ini
|
# Windows: %APPDATA%\Vmware\preferences.ini
|
||||||
# Linux: ~/.vmware/preferences
|
# Linux: ~/.vmware/preferences
|
||||||
|
# OSX: ~/Library/Preferences/VMware Fusion/preferences
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
default_vm_path = os.path.expandvars(r"%USERPROFILE%\Documents\Virtual Machines")
|
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:
|
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):
|
if os.path.isdir(default_vm_path):
|
||||||
return self._get_vms_from_default_folder(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))
|
log.warning("Default VMware VM location doesn't exist: {}".format(default_vm_path))
|
||||||
|
Loading…
Reference in New Issue
Block a user