File tree 1 file changed +18
-1
lines changed
1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ static PATH_ILLEGAL_STRINGS: &[&str] = &[
66
66
"\" " ,
67
67
"|" ,
68
68
"?" ,
69
- "*" ,
70
69
// control characters, all illegal in FAT
71
70
"\u{000} " ,
72
71
"\u{001} " ,
@@ -2314,6 +2313,24 @@ mod test {
2314
2313
}
2315
2314
}
2316
2315
2316
+ #[ test]
2317
+ fn allow_asterisk_in_target_path ( ) {
2318
+ let good_paths = & [
2319
+ "*" ,
2320
+ "*/some/path" ,
2321
+ "*/some/path/" ,
2322
+ "some/*/path" ,
2323
+ "some/*/path/*" ,
2324
+ ] ;
2325
+
2326
+ for path in good_paths. iter ( ) {
2327
+ assert ! ( safe_path( path) . is_ok( ) ) ;
2328
+ assert ! ( TargetPath :: new( path. to_string( ) ) . is_ok( ) ) ;
2329
+ assert ! ( MetadataPath :: new( path. to_string( ) ) . is_ok( ) ) ;
2330
+ assert ! ( TargetPath :: new( path. to_string( ) ) . is_ok( ) ) ;
2331
+ }
2332
+ }
2333
+
2317
2334
#[ test]
2318
2335
fn path_matches_chain ( ) {
2319
2336
let test_cases: & [ ( bool , & str , & [ & [ & str ] ] ) ] = & [
You can’t perform that action at this time.
0 commit comments