summaryrefslogtreecommitdiff
path: root/daemon/gvfsafpserver.c
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2011-08-07 17:20:37 +0200
committerChristian Kellner <gicmo@gnome.org>2011-08-25 21:19:54 +0200
commit86c934c0c06ce9b23baa580354a674bc39ae1443 (patch)
treeab3eda07f36f1842095863323bfcb8f54ab067ee /daemon/gvfsafpserver.c
parentef3653828ee408451e34975b4e169e2aa841e367 (diff)
downloadgvfs-86c934c0c06ce9b23baa580354a674bc39ae1443.tar.gz
afp: mount volumes as the user who is logged in in the afpbrowse backend
this way you don't have to write your user credentials twice if you're first browsing a server and then mounting one of it's volumes.
Diffstat (limited to 'daemon/gvfsafpserver.c')
-rw-r--r--daemon/gvfsafpserver.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/daemon/gvfsafpserver.c b/daemon/gvfsafpserver.c
index cf1c431f..a14f2e78 100644
--- a/daemon/gvfsafpserver.c
+++ b/daemon/gvfsafpserver.c
@@ -937,6 +937,9 @@ g_vfs_afp_server_login (GVfsAfpServer *afp_serv,
res = FALSE;
break;
}
+
+ if (!user)
+ user = g_strdup (olduser);
try_login:
@@ -990,7 +993,12 @@ try_login:
}
if (logged_in_user)
- *logged_in_user = user;
+ {
+ if (anonymous)
+ *logged_in_user = g_strdup ("anonymous");
+ else
+ *logged_in_user = user;
+ }
else
g_free (user);