summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-13 15:26:52 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-13 15:26:52 +0000
commit2fe89e82d26131cabbe9c9676608d1b72d3c1af0 (patch)
treed77d43b0c2ff8f33f4d512621f78d3c455f1d4a4 /commands.c
parent439510c9447bf27162f7fc02687c155b0103c502 (diff)
This patch adds on-demand loading of character set tables,
changes the default location of $SHAREDIR, and fixes some compilation problems occuring on machines without PGP installed.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index 6b9958f7..715d2902 100644
--- a/commands.c
+++ b/commands.c
@@ -554,7 +554,10 @@ static void _mutt_save_message (HEADER *h, CONTEXT *ctx, int delete, int decode,
/* returns 0 if the copy/save was successful, or -1 on error/abort */
int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redraw)
{
- int i, need_buffy_cleanup, need_passphrase = 0;
+ int i, need_buffy_cleanup;
+#ifdef _PGPPATH
+ int need_passphrase = 0;
+#endif
char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
CONTEXT ctx;
struct stat st;
@@ -573,7 +576,9 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr
if (h)
{
+#ifdef _PGPPATH
need_passphrase = h->pgp & PGPENCRYPT;
+#endif
mutt_default_save (buf, sizeof (buf), h);
}
else
@@ -592,7 +597,9 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr
if (h)
{
mutt_default_save (buf, sizeof (buf), h);
+#ifdef _PGPPATH
need_passphrase |= h->pgp & PGPENCRYPT;
+#endif
h = NULL;
}
}
@@ -629,8 +636,10 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt, int *redr
return (-1);
}
+#ifdef _PGPPATH
if(need_passphrase && (decode || decrypt) && !pgp_valid_passphrase())
return -1;
+#endif
mutt_message ("Copying to %s...", buf);