qemu://session can't write to the pool so use current directory

This commit is contained in:
Guido Gunther 2008-10-10 18:06:41 +02:00
parent 135610b098
commit 8970eba45d

View File

@ -380,11 +380,10 @@ class vmmConfig:
def get_default_image_dir(self, connection):
if connection.get_type() == "Xen":
return DEFAULT_XEN_IMAGE_DIR
#elif os.access(DEFAULT_VIRT_IMAGE_DIR, os.W_OK):
# return DEFAULT_VIRT_IMAGE_DIR
#else:
# return os.getcwd()
if connection.is_qemu_session():
return os.getcwd()
# Just return the default dir since the intention is that it
# is a managed pool and the user will be able to install to it.
return DEFAULT_VIRT_IMAGE_DIR