(ftpfs_open_socket): fix habdling of errno if connect() fails.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-12-18 21:10:01 +03:00
parent e439bd5555
commit dbd06fdeda

View File

@ -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"),