summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendsftp.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2016-03-23 09:09:16 +0100
committerOndrej Holy <oholy@redhat.com>2016-10-04 12:58:23 +0200
commit88f91664f6200e7a2e564bc75c16957b2c7149a3 (patch)
tree9b7ca323539a56b8a96d4b7b34f8ac3563c2b9b8 /daemon/gvfsbackendsftp.c
parentc960ddaf68997e5ac68c64dfbedf4db06f52fbd4 (diff)
downloadgvfs-88f91664f6200e7a2e564bc75c16957b2c7149a3.tar.gz
sftp: Fix error code if ssh is not properly configured
G_IO_ERROR_PERMISSION_DENIED is returned if ssh is not properly configured. Nautilus shows "Don't have permission to access the requested location" in such case rather than "Connection refused by server", which is confusing. G_IO_ERROR_CONNECTION_REFUSED should be returned instead. https://bugzilla.gnome.org/show_bug.cgi?id=764049
Diffstat (limited to 'daemon/gvfsbackendsftp.c')
-rw-r--r--daemon/gvfsbackendsftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 58a84550..a6f22405 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -355,7 +355,7 @@ look_for_stderr_errors (Connection *conn, GError **error)
strstr (line, "subsystem request failed") != NULL)
{
g_set_error_literal (error,
- G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+ G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED,
_("Connection refused by server"));
return;
}