From 85343692048b7920776901046174d73147795d30 Mon Sep 17 00:00:00 2001 From: ZakMcKraken Date: Tue, 17 Jan 2017 17:38:35 +0100 Subject: [PATCH] Bug correction in 'getsnaps' getsnaps not working when snapshot name contains 'creation' --- syncoid | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/syncoid b/syncoid index c9b31f2..9fe2d9b 100755 --- a/syncoid +++ b/syncoid @@ -798,11 +798,9 @@ sub getsnaps() { if ($line =~ /$fs\@/) { chomp $line; my $ctime = $line; - $ctime =~ s/^.*creation\s*//; - $ctime =~ s/\s*-$//; + $ctime =~ s/^.*\screation\s*(\d*).*/$1/; my $snap = $line; - $snap =~ s/\s*creation.*$//; - $snap =~ s/^\S*\@//; + $snap =~ s/^\S*\@(\S*)\s*creation.*$/$1/; $snaps{$type}{$snap}{'ctime'}=$ctime; } }