summaryrefslogtreecommitdiff
path: root/doc/FAQ_DEV
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-03-31 01:32:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-03-31 01:32:48 +0000
commit80dc9a8e19e8054be67234c4f185ea29a267552c (patch)
tree21422194aac66cc2de08e2c3119f6129bd245403 /doc/FAQ_DEV
parent207f4699123fbf10fc5da9b422618e00e107eca1 (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/FAQ_DEV')
0 files changed, 0 insertions, 0 deletions