diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml index 185d142b5..e49a073bd 100644 --- a/tests/data/cli/compare/virt-install-many-devices.xml +++ b/tests/data/cli/compare/virt-install-many-devices.xml @@ -227,6 +227,11 @@ + + + + +
diff --git a/tests/test_cli.py b/tests/test_cli.py index ef9b7b741..b0db96cc8 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -612,6 +612,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser --disk size=.0001,format=raw --disk size=.0001,pool=disk-pool --disk path=%(EXISTIMG1)s,type=dir +--disk path=/fooroot.img,size=.0001 --network user,mac=12:34:56:78:11:22,portgroup=foo,link_state=down,rom_bar=on,rom_file=/tmp/foo --network bridge=foobar,model=virtio,driver_name=qemu,driver_queues=3,filterref=foobar,rom.bar=off,rom.file=/some/rom,source.portgroup=foo diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py index 514523e64..e384e4674 100644 --- a/virtinst/diskbackend.py +++ b/virtinst/diskbackend.py @@ -436,11 +436,8 @@ class _StorageCreator(_StorageBase): if self.get_dev_type() == "network": self._path = self._vol_install.name else: - sep = "/" - if xmlobj.target_path == "" or xmlobj.target_path[-1] == '/': - sep = "" - self._path = (xmlobj.target_path + sep + - self._vol_install.name) + self._path = os.path.join( + xmlobj.target_path, self._vol_install.name) return self._path def get_vol_install(self):