[dovecot-cvs] dovecot/src/deliver deliver.c,1.37,1.38

tss at dovecot.org tss at dovecot.org
Sun Nov 19 22:38:11 UTC 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv11664

Modified Files:
	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.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- deliver.c	12 Nov 2006 21:31:50 -0000	1.37
+++ deliver.c	19 Nov 2006 22:38:09 -0000	1.38
@@ -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