mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
Make large path warnings human-readable
This commit is contained in:
parent
5314430437
commit
cf3b044b7e
4 changed files with 8 additions and 7 deletions
|
@ -171,7 +171,7 @@ std::pair<StorePath, Hash> StoreDirConfig::computeStorePath(
|
|||
{
|
||||
auto [h, size] = hashPath(path, method.getFileIngestionMethod(), hashAlgo, filter);
|
||||
if (size && *size >= settings.largePathWarningThreshold)
|
||||
warn("hashed large path '%s' (%d bytes)", path, *size);
|
||||
warn("hashed large path '%s' (%s)", path, renderSize(*size));
|
||||
return {
|
||||
makeFixedOutputPathFromCA(
|
||||
name,
|
||||
|
@ -215,7 +215,7 @@ StorePath Store::addToStore(
|
|||
LengthSource lengthSource(*source);
|
||||
auto storePath = addToStoreFromDump(lengthSource, name, fsm, method, hashAlgo, references, repair);
|
||||
if (lengthSource.total >= settings.largePathWarningThreshold)
|
||||
warn("copied large path '%s' to the store (%d bytes)", path, lengthSource.total);
|
||||
warn("copied large path '%s' to the store (%s)", path, renderSize(lengthSource.total));
|
||||
return storePath;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue