forked from lix-project/lix
Fix add-to-store --flat to put in correct hash
This commit is contained in:
parent
5b386b05f5
commit
e3cb536f19
|
@ -53,14 +53,10 @@ struct CmdAddToStore : MixDryRun, StoreCommand
|
||||||
|
|
||||||
auto narHash = hashString(htSHA256, *sink.s);
|
auto narHash = hashString(htSHA256, *sink.s);
|
||||||
|
|
||||||
ValidPathInfo info(store->makeFixedOutputPath(ingestionMethod, narHash, *namePart));
|
|
||||||
info.narHash = narHash;
|
|
||||||
info.narSize = sink.s->size();
|
|
||||||
|
|
||||||
Hash hash;
|
Hash hash;
|
||||||
switch (ingestionMethod) {
|
switch (ingestionMethod) {
|
||||||
case FileIngestionMethod::Recursive: {
|
case FileIngestionMethod::Recursive: {
|
||||||
hash = info.narHash;
|
hash = narHash;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FileIngestionMethod::Flat: {
|
case FileIngestionMethod::Flat: {
|
||||||
|
@ -70,6 +66,10 @@ struct CmdAddToStore : MixDryRun, StoreCommand
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ValidPathInfo info(store->makeFixedOutputPath(ingestionMethod, hash, *namePart));
|
||||||
|
info.narHash = narHash;
|
||||||
|
info.narSize = sink.s->size();
|
||||||
info.ca = makeFixedOutputCA(ingestionMethod, hash);
|
info.ca = makeFixedOutputCA(ingestionMethod, hash);
|
||||||
|
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
|
|
Loading…
Reference in a new issue