summaryrefslogtreecommitdiffstats
path: root/imap/fetch.c
diff options
context:
space:
mode:
authorSam Varshavchik2022-04-05 07:05:13 -0400
committerGitHub2022-04-05 07:05:13 -0400
commitc4d05fbbe7654da6165300e48bc4d57395908492 (patch)
tree2677d34e7d4117fe4efd9ebe469fba223e6d7569 /imap/fetch.c
parentaf1ba882028706941de5b9d791c74bb0f84027e5 (diff)
parent0bf7e3b111fdc87ae862ebb4b3fac4fdbc99a1dc (diff)
downloadcourier-libs-c4d05fbbe7654da6165300e48bc4d57395908492.tar.bz2
Merge pull request #26 from jkroonza/courier-imap-enoent-on-fetch
Only give the unavailable message if errno is ENOENT.
Diffstat (limited to 'imap/fetch.c')
-rw-r--r--imap/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap/fetch.c b/imap/fetch.c
index 257b295..10188c5 100644
--- a/imap/fetch.c
+++ b/imap/fetch.c
@@ -1592,7 +1592,7 @@ FILE *open_cached_fp(unsigned long msgnum)
{
if (fd >= 0) close(fd);
- if ((cached_fp=tmpfile()) != 0)
+ if (fd <0 && errno == ENOENT && (cached_fp=tmpfile()) != 0)
{
fprintf(cached_fp, unavailable);
if (fseek(cached_fp, 0L, SEEK_SET) < 0 ||