fix: hide path by ext name (#126)

This commit is contained in:
sigoden
2022-08-06 07:48:34 +08:00
committed by GitHub
parent dff489398e
commit 3ae75d3558
2 changed files with 19 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ pub fn glob(source: &str, target: &str) -> bool {
continue 'outer;
}
}
return true;
return false;
}
None => return true,
},
@@ -80,4 +80,7 @@ fn test_glob_key() {
assert!(!glob("abc", "adc"));
assert!(!glob("abc", "abcd"));
assert!(!glob("a?c", "abbc"));
assert!(!glob("*.log", "log"));
assert!(glob("*.log", ".log"));
assert!(glob("*.log", "a.log"));
}