[gvfs] sftp: Fix error code if ssh is not properly configured



commit 88f91664f6200e7a2e564bc75c16957b2c7149a3
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Mar 23 09:09:16 2016 +0100

    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

 daemon/gvfsbackendsftp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 58a8455..a6f2240 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;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]