Fix a too smart implicit cast

Apparently gcc is able to implicitly cast from `FileIngestionMethod` to
`ContentAddressMethod`, but clang isn't. So explicit the cast
This commit is contained in:
Théophane Hufschmitt 2024-02-28 08:00:17 +01:00
parent 6147d27afb
commit da90be789d

View file

@ -1202,7 +1202,7 @@ StorePath LocalStore::addToStoreFromDump(
Path tempDir;
AutoCloseFD tempDirFd;
bool methodsMatch = (FileIngestionMethod) dumpMethod == hashMethod;
bool methodsMatch = ContentAddressMethod(FileIngestionMethod(dumpMethod)) == hashMethod;
/* If the methods don't match, our streaming hash of the dump is the
wrong sort, and we need to rehash. */