Project

General

Profile

Feature #1989 » stat_cache.c.2.patch

peto, 2009-05-22 23:40

View differences:

stat_cache.c (revision 1008)
if (S_ISREG(st.st_mode)) {
/* fix broken stat/open for symlinks to reg files with appended slash on freebsd,osx */
if (name->ptr[name->used-2] == '/') {
errno = ENOTDIR;
return HANDLER_ERROR;
}
/* try to open the file to check if we can read it */
if (-1 == (fd = open(name->ptr, O_RDONLY))) {
return HANDLER_ERROR;
(2-2/2)