diff options
| author | Sam Varshavchik | 2022-04-05 07:05:13 -0400 |
|---|---|---|
| committer | GitHub | 2022-04-05 07:05:13 -0400 |
| commit | c4d05fbbe7654da6165300e48bc4d57395908492 (patch) | |
| tree | 2677d34e7d4117fe4efd9ebe469fba223e6d7569 /imap | |
| parent | af1ba882028706941de5b9d791c74bb0f84027e5 (diff) | |
| parent | 0bf7e3b111fdc87ae862ebb4b3fac4fdbc99a1dc (diff) | |
| download | courier-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')
| -rw-r--r-- | imap/fetch.c | 2 | ||||
| -rw-r--r-- | imap/imapscanclient.c | 2 |
2 files changed, 2 insertions, 2 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 || diff --git a/imap/imapscanclient.c b/imap/imapscanclient.c index 5ab7148..c01d40c 100644 --- a/imap/imapscanclient.c +++ b/imap/imapscanclient.c @@ -895,7 +895,7 @@ char *p; if (!filename) { - return (0); + return (-1); } p=strrchr(filename, '/')+1; |
