summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendsmb.c
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@src.gnome.org>2008-05-21 08:58:52 +0000
committerChristian Kellner <gicmo@src.gnome.org>2008-05-21 08:58:52 +0000
commit0708ed385613cdc91157189f34c92b1089b94e3e (patch)
tree0fc7aacf70432cec6d1c3f172e1299494c900cde /daemon/gvfsbackendsmb.c
parent9f0d06decd9d7582a49824d555f9121246160b96 (diff)
downloadgvfs-0708ed385613cdc91157189f34c92b1089b94e3e.tar.gz
Set the information on the mount spec at the right time
svn path=/trunk/; revision=1772
Diffstat (limited to 'daemon/gvfsbackendsmb.c')
-rw-r--r--daemon/gvfsbackendsmb.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index d9c3b5d0..70fefdef 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -506,23 +506,6 @@ do_mount (GVfsBackend *backend,
op_backend->smb_context = smb_context;
- /* Translators: This is "<sharename> on <servername>" and is used as name for an SMB share */
- display_name = g_strdup_printf (_("%s on %s"), op_backend->share, op_backend->server);
- g_vfs_backend_set_display_name (backend, display_name);
- g_free (display_name);
- g_vfs_backend_set_icon_name (backend, "folder-remote");
-
- smb_mount_spec = g_mount_spec_new ("smb-share");
- g_mount_spec_set (smb_mount_spec, "share", op_backend->share);
- g_mount_spec_set (smb_mount_spec, "server", op_backend->server);
- if (op_backend->user)
- g_mount_spec_set (smb_mount_spec, "user", op_backend->user);
- if (op_backend->domain)
- g_mount_spec_set (smb_mount_spec, "domain", op_backend->domain);
-
- g_vfs_backend_set_mount_spec (backend, smb_mount_spec);
- g_mount_spec_unref (smb_mount_spec);
-
uri = create_smb_uri (op_backend->server, op_backend->share, NULL);
op_backend->mount_source = mount_source;
@@ -559,6 +542,25 @@ do_mount (GVfsBackend *backend,
return;
}
+ /* Mount was successful */
+
+ /* Translators: This is "<sharename> on <servername>" and is used as name for an SMB share */
+ display_name = g_strdup_printf (_("%s on %s"), op_backend->share, op_backend->server);
+ g_vfs_backend_set_display_name (backend, display_name);
+ g_free (display_name);
+ g_vfs_backend_set_icon_name (backend, "folder-remote");
+
+ smb_mount_spec = g_mount_spec_new ("smb-share");
+ g_mount_spec_set (smb_mount_spec, "share", op_backend->share);
+ g_mount_spec_set (smb_mount_spec, "server", op_backend->server);
+ if (op_backend->user)
+ g_mount_spec_set (smb_mount_spec, "user", op_backend->last_user);
+ if (op_backend->domain)
+ g_mount_spec_set (smb_mount_spec, "domain", op_backend->last_domain);
+
+ g_vfs_backend_set_mount_spec (backend, smb_mount_spec);
+ g_mount_spec_unref (smb_mount_spec);
+
g_vfs_keyring_save_password (op_backend->last_user,
op_backend->server,
op_backend->last_domain,