From 6d27dc65831f3ae77ec77a0ce0e904c8824e17c0 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 6 Sep 2015 16:11:45 -0600 Subject: * S/MIME: Even though Alpine gave a message that certificates were being transferred, a local copy was not being retained, and therefore no copy was being transferred to the remote server. --- pith/pine.hlp | 2 +- pith/smime.c | 26 ++++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/pith/pine.hlp b/pith/pine.hlp index f35659a3..4201eb9c 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 93 2015-09-06 10:02:16 +Alpine Commit 94 2015-09-06 16:11:41 ============= h_news ================= diff --git a/pith/smime.c b/pith/smime.c index a4e401eb..dd5745f9 100644 --- a/pith/smime.c +++ b/pith/smime.c @@ -1657,6 +1657,12 @@ copy_dir_to_container(WhichCerts which, char *contents) int e; char datebuf[200]; + if(rd != NULL && rename_file(tempfile, rd->lf) < 0){ + q_status_message2(SM_ORDER, 3, 3, + _("Can't rename %s to %s"), tempfile, rd->lf); + ret = -1; + } + datebuf[0] = '\0'; if((e = rd_update_remote(rd, datebuf)) != 0){ @@ -1686,22 +1692,14 @@ copy_dir_to_container(WhichCerts which, char *contents) } rd_close_remdata(&rd); - } /* else */ - } /* if(!ret) */ - } /* if(!ret) */ - } - - if(tempfile){ - if(ret == 0){ - if(our_unlink(tempfile) < 0) - q_status_message1(SM_ORDER, 3, 3, - _("Error removing temporary file %s"), tempfile); - } else - q_status_message1(SM_ORDER, 3, 3, - _("Data saved to temporary file %s"), tempfile); - fs_give((void **) &tempfile); + } + } + } } + if(tempfile) + fs_give((void **) &tempfile); + if(ret_dir) fs_give((void **) &ret_dir); -- cgit v1.2.3-54-g00ecf