[pve-devel] [PATCH] fix regex: necessary by reason of changing input

Wolfgang Link w.link at proxmox.com
Fri Jul 17 07:48:16 CEST 2015


Signed-off-by: Wolfgang Link <w.link at proxmox.com>
---
 PVE/Storage/ZFSPoolPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm
index 6b095f1..b99e7e5 100644
--- a/PVE/Storage/ZFSPoolPlugin.pm
+++ b/PVE/Storage/ZFSPoolPlugin.pm
@@ -131,7 +131,7 @@ sub zfs_parse_zvol_list {
 sub parse_volname {
     my ($class, $volname) = @_;
 
-    if ($volname =~ m/^(((base|vm)-(\d+)-\S+)\/)?((base)?(vm|subvol)?-(\d+)-\S+)$/) {
+    if ($volname =~ m/^.*\/(((base|vm)-(\d+)-\S+)\/)?((base)?(vm|subvol)?-(\d+)-\S+)$/) {
 	return ('images', $5, $8, $2, $4, $6);
     }
 
-- 
2.1.4





More information about the pve-devel mailing list