mirror of https://github.com/digint/btrbk
btrbk: fix check_file: accept both relative and absolute options
parent
d3d04f2252
commit
5b2644f12a
5
btrbk
5
btrbk
|
@ -3871,7 +3871,10 @@ sub check_file($$;@)
|
||||||
|
|
||||||
if($file =~ /^($match)$/) {
|
if($file =~ /^($match)$/) {
|
||||||
$file = $1;
|
$file = $1;
|
||||||
if($accept->{absolute}) {
|
if($accept->{absolute} && $accept->{relative}) {
|
||||||
|
# accepted, matches either absolute or relative
|
||||||
|
}
|
||||||
|
elsif($accept->{absolute}) {
|
||||||
unless($file =~ /^\//) {
|
unless($file =~ /^\//) {
|
||||||
ERROR "Only absolute files allowed $error_statement" if(defined($error_statement));
|
ERROR "Only absolute files allowed $error_statement" if(defined($error_statement));
|
||||||
return undef;
|
return undef;
|
||||||
|
|
Loading…
Reference in New Issue