mirror of https://github.com/digint/btrbk
btrbk: cosmetics: sanitize trailing "/." in check_file()
parent
de5004c744
commit
7088a91fa3
1
btrbk
1
btrbk
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue