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

Diff for /src/usr.bin/xinstall/xinstall.c between version 1.52 and 1.53

version 1.52, 2012/09/14 00:00:29 version 1.53, 2013/02/18 22:15:11
Line 639 
Line 639 
                 /* It is ok for the target file not to exist. */                  /* It is ok for the target file not to exist. */
                 if (rename(path, backup) < 0 && errno != ENOENT)                  if (rename(path, backup) < 0 && errno != ENOENT)
                         err(EX_OSERR, "rename: %s to %s (errno %d)", path, backup, errno);                          err(EX_OSERR, "rename: %s to %s (errno %d)", path, backup, errno);
         } else          } else {
                 (void)unlink(path);                  if (unlink(path) < 0 && errno != ENOENT)
                           err(EX_OSERR, "%s", path);
           }
   
         return(open(path, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR));          return(open(path, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR));
 }  }

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53