[dovecot-cvs] dovecot/src/lib-index mail-index-util.c,1.20,1.21
cras at procontrol.fi
cras at procontrol.fi
Mon Feb 24 20:45:40 EET 2003
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv2842/lib-index
Modified Files:
mail-index-util.c
Log Message:
Fallback temp file creation into /tmp with in-memory indexes. Used only with
mbox rewriting.
Index: mail-index-util.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-util.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mail-index-util.c 23 Feb 2003 21:06:57 -0000 1.20
+++ mail-index-util.c 24 Feb 2003 18:45:38 -0000 1.21
@@ -96,9 +96,12 @@
hostpid_init();
/* use ".temp.host.pid" as temporary file name. unlink() it first,
- just to be sure it's not symlinked somewhere for some reason.. */
- *path = t_strconcat(index->dir, "/.temp.",
- my_hostname, ".", my_pid, NULL);
+ just to be sure it's not symlinked somewhere for some reason..
+ FIXME: this function should rather be removed entirely. With
+ in-memory indexes index->dir is NULL, so we fallback to /tmp
+ so that mbox rewriting doesn't crash. */
+ *path = t_strconcat(index->dir != NULL ? index->dir : "/tmp",
+ "/.temp.", my_hostname, ".", my_pid, NULL);
(void)unlink(*path);
/* usage of O_EXCL isn't exactly needed since the path should be
More information about the dovecot-cvs
mailing list