summaryrefslogtreecommitdiffstats
path: root/imap/fetch.c
diff options
context:
space:
mode:
authorSam Varshavchik2022-04-05 07:05:43 -0400
committerSam Varshavchik2022-04-05 07:05:43 -0400
commita86c03a704830534340347f0f4438e32fdb8ea50 (patch)
treeeaf5854c487a6997cda73e310366f9209c5c4683 /imap/fetch.c
parent9d0d19f77c6bfde4dc097fad981b1acff30068fe (diff)
parentc4d05fbbe7654da6165300e48bc4d57395908492 (diff)
downloadcourier-libs-a86c03a704830534340347f0f4438e32fdb8ea50.tar.bz2
Merge branch 'master' of github.com:svarshavchik/courier-libs
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 ||