Commit db2105c
committed
du: do not panic on a non-UTF-8 name in the --exclude check
The regular (non-safe) traversal — used with `-L`/`--dereference`, and always on
non-Linux — matched `--exclude` patterns against
`entry.file_name().into_string().unwrap()`, which aborts on any non-UTF-8 entry
name. Use `to_string_lossy()` instead, matching the sibling path check on the
same line, so a non-UTF-8 name is handled gracefully like GNU.1 parent 542e7af commit db2105c
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1367 | 1382 | | |
1368 | 1383 | | |
1369 | 1384 | | |
| |||
0 commit comments