This patch moves the call to _get_ideal_path_info earlier in get_default_path so that the suffix returned may be used instead of the hardcoded ".img" value in the case where a pool is undefined. This is a follow up patch to the patch with the subject line "reset disk image name extension to format selected". Signed-off-by: Charles Arnold <carnold@xxxxxxxx> --- virtManager/addstorage.py.orig 2015-07-23 17:13:03.711737816 -0600 +++ virtManager/addstorage.py 2015-07-23 17:14:17.264431491 -0600 @@ -218,15 +218,16 @@ class vmmAddStorage(vmmGObjectUI): def path_exists(p): return os.path.exists(p) or p in collidelist + target, ignore, suffix = self._get_ideal_path_info(name, fmt) if not pool: # Use old generating method - origf = os.path.join(default_dir, name + ".img") + origf = os.path.join(default_dir, name + suffix) f = origf n = 1 while path_exists(f) and n < 100: f = os.path.join(default_dir, name + - "-" + str(n) + ".img") + "-" + str(n) + suffix) n += 1 if path_exists(f): @@ -234,8 +235,6 @@ class vmmAddStorage(vmmGObjectUI): path = f else: - target, ignore, suffix = self._get_ideal_path_info(name, fmt) - # Sanitize collidelist to work with the collision checker newcollidelist = [] for c in collidelist: _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list