diff options
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r-- | mail/em-folder-selector.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index dea2603e2f..c502ac9a8d 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -332,10 +332,16 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs) } if (path && emfs->name_entry) { + const char *name; char *newpath; - path = newpath = g_strdup_printf ("%s/%s", path, gtk_entry_get_text (emfs->name_entry)); - emfs->selected_path = newpath; + name = gtk_entry_get_text (emfs->name_entry); + if (strcmp (path, "/") != 0) + newpath = g_strdup_printf ("%s/%s", path, name); + else + newpath = g_strdup_printf ("/%s", name); + + path = emfs->selected_path = newpath; } return path; |