If link exists, remove it before creating again

This commit is contained in:
Michiel Broek 2005-05-08 17:52:09 +00:00
parent ac30527220
commit 59148bf023

View File

@ -339,6 +339,7 @@ int AddFile(struct FILE_record f_db, int Area, char *DestPath, char *FromPath, c
}
chmod(DestPath, 0644);
if (LinkPath) {
unlink(LinkPath);
if ((rc = symlink(DestPath, LinkPath))) {
WriteError("Can't create symbolic link %s", LinkPath);
if (!do_quiet)