]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #34019 - kennytm:fix-33958, r=steveklabnik
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 2 Jun 2016 11:47:08 +0000 (13:47 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Thu, 2 Jun 2016 11:47:08 +0000 (13:47 +0200)
commit083e013086131ccc124cc881610c8444040c56bf
treeae9c6013f6cf6c360325238f9d79bb851b87b67d
parent320e27dc80ad1ced41b5a69fa6114ef70aa3340d
parent1d7f34538d9dd08958671f6606e51a32e237e174
Rollup merge of #34019 - kennytm:fix-33958, r=steveklabnik

Restore original meaning of std::fs::read_dir's example changed in #33958

`DirEntry.file_type().is_dir()` will not follow symlinks, but the original example (`fs::metadata(&path).is_dir()`) does. Therefore the change in #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.

(See discussion in the previous PR for detail.)
src/libstd/fs.rs