mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-24 02:04:13 +03:00
storage: Use .local/libvirt/images for session URIs
.config isn't really appropriate
This commit is contained in:
parent
95cda55376
commit
015da05973
@ -82,7 +82,7 @@ class _StorageObject(XMLBuilder):
|
||||
def _get_default_pool_path(conn):
|
||||
path = "/var/lib/libvirt/images"
|
||||
if conn.is_session_uri():
|
||||
path = os.path.expanduser("~/.config/libvirt/images")
|
||||
path = os.path.expanduser("~/.local/libvirt/images")
|
||||
return path
|
||||
|
||||
|
||||
@ -204,6 +204,8 @@ class StoragePool(_StorageObject):
|
||||
pool = None
|
||||
name = "default"
|
||||
path = _get_default_pool_path(conn)
|
||||
if conn.is_session_uri() and not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
||||
try:
|
||||
pool = conn.storagePoolLookupByName(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user