dovecot-2.0: fs-posix: Creating a file could have failed with "u...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 2 14:34:02 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/6d0cd769d7ac
changeset: 12251:6d0cd769d7ac
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 13 18:46:30 2010 +0100
description:
fs-posix: Creating a file could have failed with "unknown FS error"

diffstat:

 src/lib-fs/fs-posix.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 46fbd2eb8ae1 -r 6d0cd769d7ac src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c	Fri Aug 13 18:28:53 2010 +0100
+++ b/src/lib-fs/fs-posix.c	Fri Aug 13 18:46:30 2010 +0100
@@ -243,10 +243,9 @@
 
 	switch (file->open_mode) {
 	case FS_OPEN_MODE_CREATE:
-		if (link(file->temp_path, file->file.path) < 0) {
+		if ((ret = link(file->temp_path, file->file.path)) < 0) {
 			fs_set_error(file->file.fs, "link(%s, %s) failed: %m",
 				     file->temp_path, file->file.path);
-			ret = -1;
 		}
 		if (unlink(file->temp_path) < 0) {
 			fs_set_error(file->file.fs, "unlink(%s) failed: %m",


More information about the dovecot-cvs mailing list