fix: Remove trailling '*' for non-recursive directories

pull/455/head
OrIOg 2 years ago
parent 856c53f5a2
commit 46a123b32d
No known key found for this signature in database
GPG Key ID: ADB1356088AFB1E5

@ -84,7 +84,8 @@ fn allow_path(scope: &FsScope, path: &str) {
let _ = scope.allow_file(path);
}
TargetType::Directory => {
let _ = scope.allow_directory(path, false);
// We remove the '*' at the end of it, else it will be escaped by the pattern.
let _ = scope.allow_directory(&path[..path.len() - 1], false);
}
TargetType::RecursiveDirectory => {
// We remove the '**' at the end of it, else it will be escaped by the pattern.

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save