[PATCH] Handle local authentication objects
- From: Christian Neumair <chris gnome-de org>
- To: "gnome-vfs-list gnome org" <gnome-vfs-list gnome org>
- Subject: [PATCH] Handle local authentication objects
- Date: Fri, 29 Dec 2006 01:51:29 +0100
The attached patch ensures that we don't prepend a '/' character to
local objects. A similar fix is also proposed for libgnomeui [1].
[1] http://bugzilla.gnome.org/show_bug.cgi?id=390518
--
Christian Neumair <chris gnome-de org>
Index: programs/authentication.c
===================================================================
--- programs/authentication.c (Revision 5249)
+++ programs/authentication.c (Arbeitskopie)
@@ -140,18 +140,25 @@ do_full_auth (const GnomeVFSModuleCallba
out_args->abort_auth = FALSE;
name = g_string_new (NULL);
- if (in_args->username != NULL) {
- g_string_append_printf (name, "%s@", in_args->username);
- }
if (in_args->server != NULL) {
+ /* remote */
+ if (in_args->username != NULL) {
+ g_string_append_printf (name, "%s@", in_args->username);
+ }
g_string_append (name, in_args->server);
+ if (in_args->port != 0) {
+ g_string_append_printf (name, ":%d", in_args->port);
+ }
+ if (in_args->object != NULL) {
+ g_string_append_printf (name, "/%s", in_args->object);
+ }
+ } else {
+ /* local */
+ if (in_args->object != NULL) {
+ g_string_append (name, in_args->object);
+ }
}
- if (in_args->port != 0) {
- g_string_append_printf (name, ":%d", in_args->port);
- }
- if (in_args->object != NULL) {
- g_string_append_printf (name, "/%s", in_args->object);
- }
+
if (in_args->domain != NULL) {
message = g_strdup_printf (_("You must log in to access %s domain %s\n"), name->str, in_args->domain);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]