Commit 1d7f345
committed
Restore original meaning of std::fs::read_dir's example changed in rust-lang#33958.
DirEntry.file_type().is_dir() will not follow symlinks, but the original
example (fs::metadata(&path).is_dir()) does. Therefore the change in
rust-lang#33958 introduced a subtle difference that now it won't enter linked
folders. To preserve the same behavior, we use Path::is_dir() instead,
which does follow symlink.1 parent 806a553 commit 1d7f345
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
1344 | | - | |
1345 | | - | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1346 | 1347 | | |
1347 | 1348 | | |
1348 | 1349 | | |
| |||
0 commit comments