From 6f3288114dbf85be2c8c205cfae6bc54a059ced0 Mon Sep 17 00:00:00 2001 From: gralpli <25158727+gralpli@users.noreply.github.com> Date: Sat, 9 Jan 2021 22:37:10 +0100 Subject: [PATCH] Fix silently ignoring STATUS response after READ --- sshfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshfs.c b/sshfs.c index ff40c814..eed9aa89 100644 --- a/sshfs.c +++ b/sshfs.c @@ -3012,8 +3012,9 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size) if (rreq->res < 0) { chunk->sio.error = rreq->res; + res = chunk->sio.error; break; - } if (rreq->res == 0) { + } else if (rreq->res == 0) { chunk->sio.error = MY_EOF; break; } else if (size < (size_t) rreq->res) {