mirror of https://github.com/digint/btrbk
parent
2616028326
commit
2824668c0e
3
btrbk
3
btrbk
|
@ -3899,8 +3899,7 @@ sub check_file($$;@)
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
if($sanitize) {
|
if($sanitize) {
|
||||||
$file =~ s/\/+/\//g; # sanitize multiple slash
|
$file =~ s/\/(\.?\/)+/\//g; # sanitize "//", "/./" -> "/"
|
||||||
$file =~ s/\/\.\//\//g; # sanitize "/./" -> "/"
|
|
||||||
$file =~ s/\/\.$/\//; # sanitize trailing "/." -> "/"
|
$file =~ s/\/\.$/\//; # sanitize trailing "/." -> "/"
|
||||||
$file =~ s/\/$// unless($file eq '/'); # remove trailing slash
|
$file =~ s/\/$// unless($file eq '/'); # remove trailing slash
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue