diff options
| author | Jaco Kroon | 2022-04-05 10:37:17 +0200 | 
|---|---|---|
| committer | Jaco Kroon | 2022-04-05 10:37:56 +0200 | 
| commit | 0bf7e3b111fdc87ae862ebb4b3fac4fdbc99a1dc (patch) | |
| tree | 2677d34e7d4117fe4efd9ebe469fba223e6d7569 /imap/fetch.c | |
| parent | af1ba882028706941de5b9d791c74bb0f84027e5 (diff) | |
| download | courier-libs-0bf7e3b111fdc87ae862ebb4b3fac4fdbc99a1dc.tar.bz2 | |
Only give the unavailable message if errno is ENOENT.
Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Diffstat (limited to 'imap/fetch.c')
| -rw-r--r-- | imap/fetch.c | 2 | 
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 || | 
