(mh_expand_name): Changed declaration.
Showing
2 changed files
with
7 additions
and
5 deletions
... | @@ -230,7 +230,7 @@ int mh_msgset_current __P((mailbox_t mbox, mh_msgset_t *msgset, int index)); | ... | @@ -230,7 +230,7 @@ int mh_msgset_current __P((mailbox_t mbox, mh_msgset_t *msgset, int index)); |
230 | void mh_msgset_free __P((mh_msgset_t *msgset)); | 230 | void mh_msgset_free __P((mh_msgset_t *msgset)); |
231 | 231 | ||
232 | char *mh_get_dir __P((void)); | 232 | char *mh_get_dir __P((void)); |
233 | char *mh_expand_name __P((const char *name, int is_folder)); | 233 | char *mh_expand_name __P((const char *base, const char *name, int is_folder)); |
234 | 234 | ||
235 | int mh_is_my_name __P((char *name)); | 235 | int mh_is_my_name __P((char *name)); |
236 | char * mh_my_email __P((void)); | 236 | char * mh_my_email __P((void)); | ... | ... |
... | @@ -293,7 +293,7 @@ mh_open_folder (const char *folder, int create) | ... | @@ -293,7 +293,7 @@ mh_open_folder (const char *folder, int create) |
293 | char *name; | 293 | char *name; |
294 | int flags = MU_STREAM_RDWR; | 294 | int flags = MU_STREAM_RDWR; |
295 | 295 | ||
296 | name = mh_expand_name (folder, 1); | 296 | name = mh_expand_name (NULL, folder, 1); |
297 | if (create && mh_check_folder (name, 1)) | 297 | if (create && mh_check_folder (name, 1)) |
298 | exit (0); | 298 | exit (0); |
299 | 299 | ||
... | @@ -334,7 +334,7 @@ mh_get_dir () | ... | @@ -334,7 +334,7 @@ mh_get_dir () |
334 | } | 334 | } |
335 | 335 | ||
336 | char * | 336 | char * |
337 | mh_expand_name (const char *name, int is_folder) | 337 | mh_expand_name (const char *base, const char *name, int is_folder) |
338 | { | 338 | { |
339 | char *tmp = NULL; | 339 | char *tmp = NULL; |
340 | char *p = NULL; | 340 | char *p = NULL; |
... | @@ -345,10 +345,12 @@ mh_expand_name (const char *name, int is_folder) | ... | @@ -345,10 +345,12 @@ mh_expand_name (const char *name, int is_folder) |
345 | else | 345 | else |
346 | name = tmp; | 346 | name = tmp; |
347 | 347 | ||
348 | if (!base) | ||
349 | base = mu_path_folder_dir; | ||
348 | if (is_folder) | 350 | if (is_folder) |
349 | asprintf (&p, "mh:%s/%s", mu_path_folder_dir, name); | 351 | asprintf (&p, "mh:%s/%s", base, name); |
350 | else | 352 | else |
351 | asprintf (&p, "%s/%s", mu_path_folder_dir, name); | 353 | asprintf (&p, "%s/%s", base, name); |
352 | free (tmp); | 354 | free (tmp); |
353 | return p; | 355 | return p; |
354 | } | 356 | } | ... | ... |
-
Please register or sign in to post a comment