78a202101a
535fb6f6-hide-scrollbar-until-something-scrollable.patch 535fe0c2-fix-screenshot-with-qxl-spice.patch 535feaca-fix-storage-when-directory-name-contains-whitespace.patch 535ff0b7-fix-install-when-one-package-is-already-installed.patch 536152fe-fix-error-detecting-OS-in-show-all-list.patch 536154d8-show-error-if-launching-delete-dialog-fails.patch 53615662-call-path_exists-before-getting-storage-volume.patch - s390x: Set the correct emulator virtinst-set-qemu-emulator.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=169
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
Subject: Fix using storage when the directory name contains whitespace (bz 1091384)
|
|
From: Cole Robinson crobinso@redhat.com Tue Apr 29 14:09:14 2014 -0400
|
|
Date: Tue Apr 29 14:09:14 2014 -0400:
|
|
Git: feadd98fed045ec40d5d5cf8250c7b05517eb9c9
|
|
|
|
|
|
diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py
|
|
index 370996c..3d5aed8 100644
|
|
--- a/virtinst/diskbackend.py
|
|
+++ b/virtinst/diskbackend.py
|
|
@@ -137,13 +137,14 @@ def manage_path(conn, path):
|
|
return vol, pool, path_is_pool
|
|
|
|
dirname = os.path.dirname(path)
|
|
- poolname = StoragePool.find_free_name(
|
|
- conn, os.path.basename(dirname) or "pool")
|
|
+ poolname = os.path.basename(dirname).replace(" ", "_")
|
|
+ if not poolname:
|
|
+ poolname = "dirpool"
|
|
+ poolname = StoragePool.find_free_name(conn, poolname)
|
|
logging.debug("Attempting to build pool=%s target=%s", poolname, dirname)
|
|
|
|
poolxml = StoragePool(conn)
|
|
- poolxml.name = poolxml.find_free_name(
|
|
- conn, os.path.basename(dirname) or "dirpool")
|
|
+ poolxml.name = poolname
|
|
poolxml.type = poolxml.TYPE_DIR
|
|
poolxml.target_path = dirname
|
|
pool = poolxml.install(build=False, create=True, autostart=True)
|