In repair mode, update the hash of rebuilt paths
Otherwise subsequent invocations of "--repair" will keep rebuilding the path. This only happens if the path content differs between builds (e.g. due to timestamps).
This commit is contained in:
parent
6b05f688ee
commit
f9ff67e948
2 changed files with 5 additions and 4 deletions
|
|
@ -1202,9 +1202,10 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos)
|
|||
|
||||
foreach (ValidPathInfos::const_iterator, i, infos) {
|
||||
assert(i->hash.type == htSHA256);
|
||||
/* !!! Maybe the registration info should be updated if the
|
||||
path is already valid. */
|
||||
if (!isValidPath(i->path)) addValidPath(*i);
|
||||
if (isValidPath(i->path))
|
||||
updatePathInfo(*i);
|
||||
else
|
||||
addValidPath(*i);
|
||||
paths.insert(i->path);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue