fix previous fix
This commit is contained in:
parent
ac22b5470c
commit
0756c1039f
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue