]> git.lizzy.rs Git - rust.git/commit
fs: Fix #50619 (again) and add a regression test
authorTavian Barnes <tavianator@tavianator.com>
Mon, 12 Dec 2022 22:06:13 +0000 (17:06 -0500)
committerTavian Barnes <tavianator@tavianator.com>
Mon, 12 Dec 2022 22:17:26 +0000 (17:17 -0500)
commitba4dd464f5548aa3180dbe1e8144062221d6463d
tree53271b870a3174893668c21ff17a0ddb2acaa7b9
parent37d7de337903a558dbeb1e82c844fe915ab8ff25
fs: Fix #50619 (again) and add a regression test

Bug #50619 was fixed by adding an end_of_stream flag in #50630.
Unfortunately, that fix only applied to the readdir_r() path.  When I
switched Linux to use readdir() in #92778, I inadvertently reintroduced
the bug on that platform.  Other platforms that had always used
readdir() were presumably never fixed.

This patch enables end_of_stream for all platforms, and adds a
Linux-specific regression test that should hopefully prevent the bug
from being reintroduced again.
library/std/src/fs/tests.rs
library/std/src/sys/unix/fs.rs