From dbd06fdeda317c45f0068371bd2a3e85582b6e0c Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 18 Dec 2024 21:10:01 +0300 Subject: [PATCH] (ftpfs_open_socket): fix habdling of errno if connect() fails. Signed-off-by: Andrew Borodin --- src/vfs/ftpfs/ftpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vfs/ftpfs/ftpfs.c b/src/vfs/ftpfs/ftpfs.c index 6eb9c2aaf..add84ed42 100644 --- a/src/vfs/ftpfs/ftpfs.c +++ b/src/vfs/ftpfs/ftpfs.c @@ -935,7 +935,7 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super) me->verrno = errno; close (my_socket); - if (errno == EINTR && tty_got_interrupt ()) + if (me->verrno == EINTR && tty_got_interrupt ()) vfs_print_message ("%s", _("ftpfs: connection interrupted by user")); else if (res->ai_next == NULL) vfs_print_message (_("ftpfs: connection to server failed: %s"),