Improve pg_check_dir's handling of closedir() failures.
Avoid losing errno if readdir() fails and closedir() works. This also
avoids leaking the directory handle when readdir() fails. Commit
6f03927fce038096f53ca67eeab9adb24938f8a6 introduced logic to better
handle readdir() and closedir() failures, bu it missed these cases.
Extracted from a larger patch by Marco Nenciarini.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/d7d294f5935e157f239b32c6d1f3d4e923a4eed5
Modified Files
--------------
src/port/pgcheckdir.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)