From 8ca8c2b289a76c73e5f88f0bd2c5dbcd61f4950d Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Wed, 3 Oct 2001 17:10:40 +0000 Subject: [PATCH] fixed broken code in maildir_clean_tmp() --- ChangeLog | 125 ++++++++++++++++++++++++++++++++++++++++++++-------- Makefile.am | 2 +- maildir.c | 4 +- 3 files changed, 109 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index b14b111..a233d43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,91 @@ -2001-06-12 me +2001-10-03 me + + * TODO, maildir.c: + added code to clean the tmp directory in a maildir to comply with + maildir(5) + + * config.c: + forgot to add code to parse the `Delete' option + + * main.c: + forgot conditional #if HAVE_LIBSSL around setting of .use_imaps in main() + from command line arguments + + * main.c: update Copyright printed by --help + + add compile time option list to --help output + + * NEWS, TODO, config.c, isync.1, isync.h, main.c, sample.isyncrc, sync.c: + added `Delete' configuration option to force -d option + + sync_mailbox() didn't consider MaxSize == 0 to mean "unlimited". + + load_config() needs to print a newline in its error messages since + next_arg() kills the newline of the line that was read out of the config + file. + + * TODO: update TODO list with action items + + * imap.c, sync.c: + fixed maildir message filenames to comply with the maildir(5) specification. + + fixed write_strip() and imap_fetch_message() to check the return code of + write() and fsync() to comply with maildir(5) spec. + +2001-10-02 me + + * main.c: + the `Expunge' config directive didn't work since only the -e command line + argument was consulted. + + * config.c, imap.c, isync.h: + we should issue a CAPABILITY even if we aren't going to use ssl/tls so that + cram-md5 auth still works. + +2001-07-18 me + + * config.c: + find_box() should attempt to expand all filenames if none of the other + methods found a match. + + * isync.h, maildir.c, config.c: + fixed to not expand filenames until they are used inside of maildir_open(), + so that aliases are not required for simple filenames. + [re: http://bugs.debian.org/102255] + +2001-06-22 me + + * main.c: --host option didn't check for imaps: prefix + +2001-06-21 me + + * main.c: + fixed core when specifying multiple mailboxes on the command line + +2001-06-18 me + + * isync.1, TODO, configure.in, imap.c: + handle untagged responses in imap_fetch_message() so that it doesn't bomb + out if new mail arrives while in the process of downloading + + noted in BUGS section of man page that if new mail arrives after the initial + message list has been retrieved from the IMAP server, that new mail will not + be fetched until the next invocation of isync. + + * config.c, imap.c, isync.h, main.c: + isync should continue to process additional mailboxes even if there is an + error with a previous mailbox. + + added -a (--all) flag to synchronize all mailboxes defined in ~/.isyncrc + +2001-06-13 me + + * NEWS: post 0.5-release commit + + * ChangeLog, smtppush: + updated ChangeLog. removed smtppush binary. + +2001-06-12 me * Makefile, config.cache, config.log, config.status: auto generated files should not be part of the CVS tree @@ -14,19 +101,19 @@ * COPYING, INSTALL, Makefile.am, config.log, configure, configure.in, install-sh, main.c, missing, mkinstalldirs, AUTHORS, Makefile.in, README: initial import -2001-02-28 me +2001-02-28 me * config.c, imap.c: fixed compiler warnings under Solaris 2.7 -2001-02-19 me +2001-02-19 me * ChangeLog, cram.c, imap.c, maildir.c: rfc2595 compliance patch from Daniel Resare - CAPABILITY should be reissued after starting TLS since the previous call was not protected -2001-02-14 me +2001-02-14 me * config.c, imap.c, isync.1, main.c, sync.c: patch from Daniel Resare : @@ -65,12 +152,12 @@ give error message when the LOGIN command fails -2001-02-01 me +2001-02-01 me * imap.c: patch from Daniel Resare - don't initialize ssl support if none of use_sslv* is enabled -2001-01-26 me +2001-01-26 me * imap.c, isync.h: include for off_t @@ -78,14 +165,14 @@ patch from "lorenzo martignoni" - fixed uploading of message to IMAP server -2001-01-24 me +2001-01-24 me * config.c, cram.c, imap.c, isync.1, list.c, maildir.c, main.c, sync.c: fixed cram compilation error under bsd updated man page -2001-01-16 me +2001-01-16 me * TODO, config.c, imap.c, isync.1, isync.h, main.c: added support for tilde (~) expansion in the `Mailbox' and `CertificateFile' @@ -95,7 +182,7 @@ user's mailboxes. If a relative path is used in a `Mailbox' command, this path is used as a prefix. -2001-01-11 me +2001-01-11 me * configure.in, imap.c, isync.h: set imap->prefix to be the namespace prefix @@ -113,7 +200,7 @@ added CopyDeletedTo configuration option -2001-01-09 me +2001-01-09 me * maildir.c, sync.c: always put changed messages in the cur/ subdirectory since they are no @@ -123,7 +210,7 @@ flag on the message since Mutt will move Old (unread, but not recent) messges into cur/. -2001-01-08 me +2001-01-08 me * Makefile.am, main.c: patch from Hugo Haas @@ -132,12 +219,12 @@ set global password to the one the user inputs and use that as the default for remaining mailboxes -2001-01-05 me +2001-01-05 me * configure.in: added --with-ssl-dir to specify an alternate installation of OpenSSL -2000-12-31 me +2000-12-31 me * ChangeLog, isync.spec: pre 0.4 commit. @@ -151,12 +238,12 @@ fixed compilation error with no libssl support ("lorenzo martignoni" ) -2000-12-28 me +2000-12-28 me * main.c: fixed config parser to accept arbitrary whitespace -2000-12-27 me +2000-12-27 me * imap.c: use imap_close to terminate a connection in imap_open() @@ -169,7 +256,7 @@ don't initialize ssl unless we are going to use it. -2000-12-23 me +2000-12-23 me * imap.c, isync.h: don't use NAMESPACE unless the server supports it @@ -179,7 +266,7 @@ parse server capability string to determine if STARTTLS is available -2000-12-22 me +2000-12-22 me * README, imap.c, isync.1, isync.h, main.c: isync-brokenservers.diff (Jeremy Katz ) @@ -207,7 +294,7 @@ fixed --fast to work robustly without relying on the \Recent flag in messages -2000-12-21 me +2000-12-21 me * imap.c, isync.h, maildir.c, sync.c: RFC822.PEEK is obsolete in RFC2060. Use BODY.PEEK[] instead, which does @@ -268,7 +355,7 @@ local messages with updated flags were not corrected renamed -2000-12-20 me +2000-12-20 me * ChangeLog, Makefile.am: updated ChangeLog diff --git a/Makefile.am b/Makefile.am index fbdadc0..d9f498d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ EXTRA_DIST=sample.isyncrc $(man_MANS) INCLUDES=$(RPM_OPT_FLAGS) log: - rcs2log -h sigipe.org | sed 's;/home/cvs/isync/;;g' > ChangeLog + rcs2log -h sigpipe.org | sed 's;/home/cvs/isync/;;g' > ChangeLog isync.html: isync.1 groff -Thtml -man isync.1 > isync.html diff --git a/maildir.c b/maildir.c index 159e6f9..624e264 100644 --- a/maildir.c +++ b/maildir.c @@ -451,10 +451,10 @@ maildir_clean_tmp (const char *mbox) time (&now); while ((entry = readdir (dirp))) { - snprintf (path, sizeof (path), "%s/tmp/%s", path, entry->d_name); + snprintf (path, sizeof (path), "%s/tmp/%s", mbox, entry->d_name); if (stat (path, &info)) fprintf (stderr, "maildir_clean_tmp: stat: %s: %s (errno %d)\n", path, strerror (errno), errno); - else if (now - info.st_ctime >= _24_HOURS) + else if (S_ISREG (info.st_mode) && now - info.st_ctime >= _24_HOURS) { /* this should happen infrequently enough that it won't be * bothersome to the user to display when it occurs.