btrbk: fix check_file: accept both relative and absolute options

pull/411/head
Axel Burri 2021-07-24 12:47:34 +02:00
parent d3d04f2252
commit 5b2644f12a
1 changed files with 4 additions and 1 deletions

5
btrbk
View File

@ -3871,7 +3871,10 @@ sub check_file($$;@)
if($file =~ /^($match)$/) {
$file = $1;
if($accept->{absolute}) {
if($accept->{absolute} && $accept->{relative}) {
# accepted, matches either absolute or relative
}
elsif($accept->{absolute}) {
unless($file =~ /^\//) {
ERROR "Only absolute files allowed $error_statement" if(defined($error_statement));
return undef;