On Fri, 2004-12-17 at 16:43 +0100, Johannes Berg wrote:
/home/jmberg/Maildir/dovecot.index.tmp: Permission denied imap(jmberg): Error: rename(/home/jmberg/Maildir/dovecot.index.tmp, .. I think this is probably due to the indexing code opening the .tmp file and then unlinking it and trying to re-create it while the first is still open. Or something, I really am not sure.
Yes, that's it.
*Maybe* the index code might be made work if it creates a new temporary file-name every time it re-creates the file, but I don't understand the code well enough (yet) to give a better analysis of the problem.
For dovecot.index.tmp that would work, but then there's also dovecot.index.log.newlock which works as a lock file, it can't be renamed. It could probably be fixed just by closing all the fds to the file before rename().
Anyway both solutions get a bit kludgy. Perhaps I could do them with some #ifdef CYGWIN, but I don't really want to fix those myself.