Commit 17022b24 17022b246469c859958971427d794b29c5862635 by Sergey Poznyakoff

(mh_expand_name): Changed declaration.

1 parent 37529525
......@@ -230,7 +230,7 @@ int mh_msgset_current __P((mailbox_t mbox, mh_msgset_t *msgset, int index));
void mh_msgset_free __P((mh_msgset_t *msgset));
char *mh_get_dir __P((void));
char *mh_expand_name __P((const char *name, int is_folder));
char *mh_expand_name __P((const char *base, const char *name, int is_folder));
int mh_is_my_name __P((char *name));
char * mh_my_email __P((void));
......
......@@ -293,7 +293,7 @@ mh_open_folder (const char *folder, int create)
char *name;
int flags = MU_STREAM_RDWR;
name = mh_expand_name (folder, 1);
name = mh_expand_name (NULL, folder, 1);
if (create && mh_check_folder (name, 1))
exit (0);
......@@ -334,7 +334,7 @@ mh_get_dir ()
}
char *
mh_expand_name (const char *name, int is_folder)
mh_expand_name (const char *base, const char *name, int is_folder)
{
char *tmp = NULL;
char *p = NULL;
......@@ -345,10 +345,12 @@ mh_expand_name (const char *name, int is_folder)
else
name = tmp;
if (!base)
base = mu_path_folder_dir;
if (is_folder)
asprintf (&p, "mh:%s/%s", mu_path_folder_dir, name);
asprintf (&p, "mh:%s/%s", base, name);
else
asprintf (&p, "%s/%s", mu_path_folder_dir, name);
asprintf (&p, "%s/%s", base, name);
free (tmp);
return p;
}
......