From e39263588d576692a3adcd10bfa2ee6f6b146574 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Thu, 19 Mar 2015 11:46:59 +0100 Subject: [PATCH] btrbk: bugfix: allow '@' character for subvolume names (ubuntu prefixes all subvolumes with '@' in its subvolume layout) --- ChangeLog | 4 ++++ btrbk | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04f4023..c49f962 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,3 +11,7 @@ - cleaner and more generic parsing of btrfs subvolume list - bugfix: subvolumes are also allowed for "snapshot_dir" (fixes issues #1, #2) + +* btrbk-current + - bugfix: allow '@' character for subvolume names (ubuntu prefixes + all subvolumes with '@' in its subvolume layout) diff --git a/btrbk b/btrbk index 7bf2f0d..084311a 100755 --- a/btrbk +++ b/btrbk @@ -47,7 +47,7 @@ use Date::Calc qw(Today Delta_Days Day_of_Week); use Getopt::Std; use Data::Dumper; -our $VERSION = "0.12"; +our $VERSION = "0.13-dev"; our $AUTHOR = 'Axel Burri '; our $PROJECT_HOME = ''; @@ -87,7 +87,7 @@ my $loglevel = 1; my $ip_addr_match = qr/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])/; my $host_name_match = qr/(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/; -my $file_match = qr/[0-9a-zA-Z_\-\.\/]+/; +my $file_match = qr/[0-9a-zA-Z_@\-\.\/]+/; # note: ubuntu uses '@' in the subvolume layout: my $ssh_prefix_match = qr/ssh:\/\/($ip_addr_match|$host_name_match)/;