date and time created 83/10/02 21:41:04 by sam
[unix-history] / usr / src / usr.bin / mail / v7.local.c
index 7a72a3f..c94d5b5 100644 (file)
@@ -1,4 +1,6 @@
-#
+#ifndef lint
+static char sccsid[] = "@(#)v7.local.c 2.3 (Berkeley) %G%";
+#endif
 
 /*
  * Mail -- a mail program
 
 /*
  * Mail -- a mail program
@@ -10,8 +12,6 @@
 
 #include "rcv.h"
 
 
 #include "rcv.h"
 
-static char *SccsId = "@(#)v7.local.c  2.1 %G%";
-
 /*
  * Locate the user's mailbox file (ie, the place where new, unread
  * mail is queued).  In Version 7, it is in /usr/spool/mail/name.
 /*
  * Locate the user's mailbox file (ie, the place where new, unread
  * mail is queued).  In Version 7, it is in /usr/spool/mail/name.
@@ -38,8 +38,10 @@ demail()
 
        if (value("keep") != NOSTR)
                close(creat(mailname, 0666));
 
        if (value("keep") != NOSTR)
                close(creat(mailname, 0666));
-       else
-               remove(mailname);
+       else {
+               if (remove(mailname) < 0)
+                       close(creat(mailname, 0666));
+       }
 }
 
 /*
 }
 
 /*