Use util_getenv(). Honour outfolder variable, when set.
Showing
1 changed file
with
2 additions
and
6 deletions
... | @@ -45,9 +45,6 @@ mail_copy0 (int argc, char **argv, int mark) | ... | @@ -45,9 +45,6 @@ mail_copy0 (int argc, char **argv, int mark) |
45 | else | 45 | else |
46 | filename = strdup ("mbox"); | 46 | filename = strdup ("mbox"); |
47 | 47 | ||
48 | if (!filename) | ||
49 | return 1; | ||
50 | |||
51 | if (msgset_parse (argc, argv, &msglist)) | 48 | if (msgset_parse (argc, argv, &msglist)) |
52 | { | 49 | { |
53 | if (filename) | 50 | if (filename) |
... | @@ -56,14 +53,13 @@ mail_copy0 (int argc, char **argv, int mark) | ... | @@ -56,14 +53,13 @@ mail_copy0 (int argc, char **argv, int mark) |
56 | } | 53 | } |
57 | 54 | ||
58 | if (sender) | 55 | if (sender) |
59 | { | 56 | filename = util_outfolder_name (util_get_sender (msglist->msg_part[0], 1)); |
60 | filename = util_get_sender(msglist->msg_part[0], 1); | 57 | |
61 | if (!filename) | 58 | if (!filename) |
62 | { | 59 | { |
63 | msgset_free (msglist); | 60 | msgset_free (msglist); |
64 | return 1; | 61 | return 1; |
65 | } | 62 | } |
66 | } | ||
67 | 63 | ||
68 | if (mailbox_create_default (&mbx, filename) | 64 | if (mailbox_create_default (&mbx, filename) |
69 | || mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT)) | 65 | || mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT)) | ... | ... |
-
Please register or sign in to post a comment