Commit 006b7e3
committed
Validate extension in
The extension is validated in `PathBuf::set_extension`, but not
`add_extension`. Fix that. Check for both / and \ path separators on
Windows, even when the path is verbatim, since this is logically like
`PathBuf::push` which normalizes separators (i.e., keeping the current
behavior).PathBuf::add_extension
1 parent 8bf5a8d commit 006b7e3
1 file changed
+17
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
| |||
1507 | 1516 | | |
1508 | 1517 | | |
1509 | 1518 | | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | 1522 | | |
| |||
1541 | 1544 | | |
1542 | 1545 | | |
1543 | 1546 | | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
1544 | 1552 | | |
1545 | 1553 | | |
1546 | 1554 | | |
| |||
1582 | 1590 | | |
1583 | 1591 | | |
1584 | 1592 | | |
| 1593 | + | |
| 1594 | + | |
1585 | 1595 | | |
1586 | 1596 | | |
1587 | 1597 | | |
| |||
0 commit comments