btrbk: cosmetics: sanitize trailing "/." in check_file()

pull/245/head
Axel Burri 2018-07-07 15:53:03 +02:00
parent de5004c744
commit 7088a91fa3
1 changed files with 1 additions and 0 deletions

1
btrbk
View File

@ -3112,6 +3112,7 @@ sub check_file($$;@)
if($sanitize) {
$file =~ s/\/+/\//g; # sanitize multiple slash
$file =~ s/\/\.\//\//g; # sanitize "/./" -> "/"
$file =~ s/\/\.$/\//; # sanitize trailing "/." -> "/"
$file =~ s/\/$// unless($file eq '/'); # remove trailing slash
}
return $file;