diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-24T14·25+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-24T14·25+0000 |
commit | 034f608e004c3206ff99c55c107139c38bfe9408 (patch) | |
tree | 32cd3d3931db5e6237d9c3087c5216ae6ee6b7e9 /src/libstore/local-store.cc | |
parent | f58f51f38007f8bfb1089c3b4c88b6e66da15f39 (diff) |
* Don't complain if the stored hash of a path is zero (unknown).
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index bddcbad12bcf..9254ceee4cd6 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1022,10 +1022,11 @@ void LocalStore::exportPath(const Path & path, bool sign, dumpPath(path, hashAndWriteSink); /* Refuse to export paths that have changed. This prevents - filesystem corruption from spreading to other machines. */ + filesystem corruption from spreading to other machines. + Don't complain if the stored hash is zero (unknown). */ Hash hash = hashAndWriteSink.currentHash(); Hash storedHash = queryPathHash(path); - if (hash != storedHash) + if (hash != storedHash && storedHash != Hash(storedHash.type)) throw Error(format("hash of path `%1%' has changed from `%2%' to `%3%'!") % path % printHash(storedHash) % printHash(hash)); |