changeset 100823:d893844c75a7

(main): Fatal if hard links cannot be created.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 01 Jan 2009 09:34:28 +0000
parents b00a3256904f
children e5aa6a069f40
files lib-src/movemail.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/movemail.c	Thu Jan 01 09:34:15 2009 +0000
+++ b/lib-src/movemail.c	Thu Jan 01 09:34:28 2009 +0000
@@ -341,6 +341,13 @@
 	  close (desc);
 
 	  tem = link (tempname, lockname);
+
+#ifdef EPERM
+	  if (tem < 0 && errno == EPERM)
+	    fatal ("Unable to create hard link between %s and %s",
+		   tempname, lockname);
+#endif
+
 	  unlink (tempname);
 	  if (tem >= 0)
 	    break;