diff --git a/ChangeLog b/ChangeLog index 664f277..a988fec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +btrbk-current + + * Bugfix: fix crash when using btrfs-progs < 3.17.3 (closes: #24). + btrbk-0.19.1 * Use "cgen" for snapshot comparison. diff --git a/btrbk b/btrbk index 162a9fc..76df0f5 100755 --- a/btrbk +++ b/btrbk @@ -625,6 +625,12 @@ sub btrfs_subvolume_detail($) my $ret = run_cmd("$rsh btrfs subvolume show '$path'", non_destructive => 1, catch_stderr => 1); return undef unless(defined($ret)); + # workaround for btrfs-progs < 3.17.3 (returns exit status 0 on errors) + if($ret =~ /^ERROR: (.*)/) { + $err = $1; + return undef; + } + my $real_path; if($ret =~ /^($file_match)/) { $real_path = $1;