mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 10:46:15 +02:00
path fetcher: Allow the lastModified attribute to be overriden again
Fixes #11660.
This commit is contained in:
parent
d5c45952ac
commit
5d35424445
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue