mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
path fetcher: Allow the lastModified attribute to be overriden again
Fixes #11660.
This commit is contained in:
parent
d5c45952ac
commit
5d35424445
@ -157,7 +157,11 @@ struct PathInputScheme : InputScheme
|
|||||||
});
|
});
|
||||||
storePath = store->addToStoreFromDump(*src, "source");
|
storePath = store->addToStoreFromDump(*src, "source");
|
||||||
}
|
}
|
||||||
input.attrs.insert_or_assign("lastModified", uint64_t(mtime));
|
|
||||||
|
/* Trust the lastModified value supplied by the user, if
|
||||||
|
any. It's not a "secure" attribute so we don't care. */
|
||||||
|
if (!input.getLastModified())
|
||||||
|
input.attrs.insert_or_assign("lastModified", uint64_t(mtime));
|
||||||
|
|
||||||
return {makeStorePathAccessor(store, *storePath), std::move(input)};
|
return {makeStorePathAccessor(store, *storePath), std::move(input)};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user