[dovecot-cvs] dovecot/src/lib module-dir.c,1.26,1.27
tss at dovecot.org
tss at dovecot.org
Thu Dec 21 15:54:00 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv29098
Modified Files:
module-dir.c
Log Message:
If the module dir doesn't exist, die only if we were given a list of modules
to load. Otherwise fail silently.
Index: module-dir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- module-dir.c 21 Dec 2006 11:29:25 -0000 1.26
+++ module-dir.c 21 Dec 2006 15:53:56 -0000 1.27
@@ -190,8 +190,16 @@
i_info("Loading modules from directory: %s", dir);
dirp = opendir(dir);
- if (dirp == NULL)
- i_fatal("opendir(%s) failed: %m", dir);
+ if (dirp == NULL) {
+ if (module_names != NULL) {
+ /* we were given a list of modules to load.
+ we can't fail. */
+ i_fatal("opendir(%s) failed: %m", dir);
+ }
+ if (errno != ENOENT)
+ i_error("opendir(%s) failed: %m", dir);
+ return NULL;
+ }
pool = pool_alloconly_create("module loader", 1024);
p_array_init(&names, pool, 32);
More information about the dovecot-cvs
mailing list