From 8f2d6449f740fb5da8259762d79071161c98ed14 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 12 Oct 2024 01:06:03 +0000 Subject: [PATCH] op_return: also log the inner error, since we use that for matching against timeouts --- ftpfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ftpfs.c b/ftpfs.c index 6a8fd5d..4ec99f4 100644 --- a/ftpfs.c +++ b/ftpfs.c @@ -224,11 +224,12 @@ static int op_return(int err, char * operation) DEBUG(2, "%s successful\n", operation); return 0; } - dprintf(ftpfs.stderr_fd, "ftpfs: operation %s failed because %s\n", operation, strerror(-err)); + dprintf(ftpfs.stderr_fd, "ftpfs: operation %s failed because %s. inner: %s\n", operation, strerror(-err), error_buf); if (strstr(error_buf, "timed out") != NULL || strstr(error_buf, "timeout") != NULL || strstr(error_buf, "time-out") != NULL) { // try to match any curl error which would indiciate that the mount is offline. + dprintf(ftpfs.stderr_fd, "exiting due to timeout\n"); fuse_exit(fuse_get_context()->fuse); } return err;