Add function to extract hash part of a store path
This commit is contained in:
parent
74f954ee62
commit
d089372565
3 changed files with 15 additions and 2 deletions
|
|
@ -1064,7 +1064,7 @@ StringSet LocalStore::queryDerivationOutputNames(const Path & path)
|
|||
|
||||
Path LocalStore::queryPathFromHashPart(const string & hashPart)
|
||||
{
|
||||
if (hashPart.size() != 32) throw Error("invalid hash part");
|
||||
if (hashPart.size() != storePathHashLen) throw Error("invalid hash part");
|
||||
|
||||
Path prefix = settings.nixStore + "/" + hashPart;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue