changeset 4404:76e2177be0bf HEAD

Handle EMLINK and EPERM errors the same way as EXDEV when handling hardlink failures. Added ECANTLINK() macro for this.
author Timo Sirainen <tss@iki.fi>
date Sat, 17 Jun 2006 18:56:59 +0300
parents e1c32d917934
children fe17f63521ea
files src/lib-storage/index/maildir/maildir-copy.c src/lib/compat.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-copy.c	Sat Jun 17 18:38:19 2006 +0300
+++ b/src/lib-storage/index/maildir/maildir-copy.c	Sat Jun 17 18:56:59 2006 +0300
@@ -73,7 +73,7 @@
 					       "Not enough disk space");
 			return -1;
 		}
-		if (errno == EACCES || errno == EXDEV)
+		if (errno == EACCES || ECANTLINK(errno))
 			return 1;
 
 		mail_storage_set_critical(STORAGE(mbox->storage),
--- a/src/lib/compat.h	Sat Jun 17 18:38:19 2006 +0300
+++ b/src/lib/compat.h	Sat Jun 17 18:56:59 2006 +0300
@@ -196,4 +196,7 @@
 #define ENOTFOUND(errno) \
 	((errno) == ENOENT || (errno) == ENOTDIR || (errno) == ELOOP)
 
+#define ECANTLINK(errno) \
+	((errno) == EXDEV || (errno) == EMLINK || (errno) == EPERM)
+
 #endif