Unlink the right file
This commit is contained in:
parent
0f65793f94
commit
fd63c8bfcd
1 changed files with 2 additions and 2 deletions
|
@ -159,8 +159,8 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
|
|||
printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath);
|
||||
|
||||
/* Unlink the temp link. */
|
||||
if (unlink(linkPath.c_str()) == -1)
|
||||
printMsg(lvlError, format("unable to unlink `%1%'") % linkPath);
|
||||
if (unlink(tempLink.c_str()) == -1)
|
||||
printMsg(lvlError, format("unable to unlink `%1%'") % tempLink);
|
||||
return;
|
||||
}
|
||||
throw SysError(format("cannot rename `%1%' to `%2%'") % tempLink % path);
|
||||
|
|
Loading…
Reference in a new issue