From ce1bde69b532e284d97cc66ecc918e6a7e64530a Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 16 Dec 2022 16:32:06 +0000 Subject: [PATCH] fixed the wrong flags check in the http file handler --- lib/http-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http-file.c b/lib/http-file.c index 10c4bad..eaa9731 100644 --- a/lib/http-file.c +++ b/lib/http-file.c @@ -698,7 +698,7 @@ static int open_peer_with_mode (file_t* file, const hio_bch_t* actual_file, int } opened_file = actual_file; - if ((flags & O_RDONLY) && fstat(file->peer, &st) >= 0 && S_ISDIR(st.st_mode)) /* only for read operation */ + if ((flags | O_RDONLY) && fstat(file->peer, &st) >= 0 && S_ISDIR(st.st_mode)) /* only for read operation */ { hio_bch_t* alt_file; int alt_fd;