[dovecot-cvs] dovecot/src/deliver deliver.c,1.20.2.20,1.20.2.21
tss at dovecot.org
tss at dovecot.org
Sun Nov 19 22:38:09 UTC 2006
Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv11671
Modified Files:
Tag: branch_1_0
deliver.c
Log Message:
chdir() now gives error only if error is something else than ENOENT. Also
with debugging enabled log if the home isn't found.
Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/deliver.c,v
retrieving revision 1.20.2.20
retrieving revision 1.20.2.21
diff -u -d -r1.20.2.20 -r1.20.2.21
--- deliver.c 12 Nov 2006 21:31:48 -0000 1.20.2.20
+++ deliver.c 19 Nov 2006 22:38:07 -0000 1.20.2.21
@@ -499,8 +499,12 @@
could be written in case we crash. */
home = getenv("HOME");
if (home != NULL) {
- if (chdir(home) < 0)
- i_error("chdir(%s) failed: %m", home);
+ if (chdir(home) < 0) {
+ if (errno != ENOENT)
+ i_error("chdir(%s) failed: %m", home);
+ else if (getenv("DEBUG") != NULL)
+ i_info("Home dir not found: %s", home);
+ }
}
} else {
destination = user;
More information about the dovecot-cvs
mailing list