summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2008-03-31 01:33:13 +0000
committerTom Lane2008-03-31 01:33:13 +0000
commit2069940bc6c8d576f0bf628a38396bcb853f2c56 (patch)
tree29f349e2c099175ecb1c0c27d20d5e0cf672a4bd /doc/src
parente5e66ac021fbbe4fd60b98511b68b6157ff2273a (diff)
Fix a number of places that were making file-type tests infelicitously.
The places that did, eg, (statbuf.st_mode & S_IFMT) == S_IFDIR were correct, but there is no good reason not to use S_ISDIR() instead, especially when that's what the other 90% of our code does. The places that did, eg, (statbuf.st_mode & S_IFDIR) were flat out *wrong* and would fail in various platform-specific ways, eg a symlink could be mistaken for a regular file on most Unixen. The actual impact of this is probably small, since the problem cases seem to always involve symlinks or sockets, which are unlikely to be found in the directories that PG code might be scanning. But it's clearly trouble waiting to happen, so patch all the way back anyway. (There seem to be no occurrences of the mistake in 7.4.)
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions