aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-config.c15
2 files changed, 16 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 70847b04a1..b8b098e807 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-config.c (get_service_url): Always prepend a leading "/" to
+ the url->path.
+ (set_service_url): Added more error checking and also strip the
+ leading '/' from the url->path
+
2000-07-25 Michael Meeks <michael@helixcode.com>
* mail-config.c (create_identity_page): set default signature to
diff --git a/mail/mail-config.c b/mail/mail-config.c
index ab11e1cf5f..d13b4b3641 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -503,8 +503,11 @@ get_service_url (GtkObject *table)
if (editable)
url->host = gtk_editable_get_chars (editable, 0, -1);
editable = gtk_object_get_data (table, "path_entry");
- if (editable)
- url->path = gtk_editable_get_chars (editable, 0, -1);
+ if (editable) {
+ char *path = gtk_editable_get_chars (editable, 0, -1);
+ url->path = g_strdup_printf ("/%s", path);
+ g_free (path);
+ }
auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu");
if (auth_optionmenu) {
@@ -546,16 +549,16 @@ set_service_url (GtkObject *table, char *url_str)
}
editable = gtk_object_get_data (table, "user_entry");
- if (editable && url)
+ if (editable && url && url->user)
gtk_entry_set_text (GTK_ENTRY (editable), url->user);
editable = gtk_object_get_data (table, "server_entry");
- if (editable && url)
+ if (editable && url && url->host)
gtk_entry_set_text (GTK_ENTRY (editable), url->host);
editable = gtk_object_get_data (table, "path_entry");
- if (editable && url)
- gtk_entry_set_text (GTK_ENTRY (editable), url->path);
+ if (editable && url && url->path && *url->path)
+ gtk_entry_set_text (GTK_ENTRY (editable), url->path + 1);
/* How are we gonna do this? */
auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu");