2
0
Fork 0

fix previous fix

This commit is contained in:
Thomas Porzelt 2009-03-26 23:33:28 +01:00
parent ac22b5470c
commit 0756c1039f
1 changed files with 3 additions and 3 deletions

View File

@ -216,7 +216,7 @@ static handler_t core_handle_static(vrequest *vr, gpointer param, gpointer *cont
if (res == HANDLER_ERROR) {
/* open or fstat failed */
if (fd)
if (fd != -1)
close(fd);
if (!vrequest_handle_direct(vr)) {
@ -236,7 +236,7 @@ static handler_t core_handle_static(vrequest *vr, gpointer param, gpointer *cont
return HANDLER_ERROR;
}
} else if (S_ISDIR(st.st_mode)) {
if (fd)
if (fd != -1)
close(fd);
return HANDLER_GO_ON;
} else if (!S_ISREG(st.st_mode)) {
@ -244,7 +244,7 @@ static handler_t core_handle_static(vrequest *vr, gpointer param, gpointer *cont
VR_DEBUG(vr, "not a regular file: '%s'", vr->physical.path->str);
}
if (fd)
if (fd != -1)
close(fd);
if (!vrequest_handle_direct(vr)) {