[BACK]Return to fio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Diff for /src/usr.bin/mail/fio.c between version 1.15 and 1.16

version 1.15, 1998/06/11 06:20:18 version 1.16, 1998/06/12 17:51:51
Line 271 
Line 271 
 }  }
   
 /*  /*
  * Delete a file, but only if the file is a plain file.   * Delete or truncate a file, but only if the file is a plain file.
  */   */
 int  int
 rm(name)  rm(name)
Line 285 
Line 285 
                 errno = EISDIR;                  errno = EISDIR;
                 return(-1);                  return(-1);
         }          }
         return(unlink(name));          if (unlink(name) == -1) {
                   if (errno == EPERM)
                           return(truncate(name, 0));
                   else
                           return(-1);
           }
           return(0);
 }  }
   
 static int sigdepth;            /* depth of holdsigs() */  static int sigdepth;            /* depth of holdsigs() */

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16