mirror of
https://github.com/NixOS/nix
synced 2025-07-03 22:51:47 +02:00
* Refactoring to support SHA-1.
This commit is contained in:
parent
d46b4262dc
commit
73992371a3
6 changed files with 36 additions and 18 deletions
|
@ -39,9 +39,9 @@ static string makeNode(const string & id, const string & label,
|
|||
static string symbolicName(const string & path)
|
||||
{
|
||||
string p = baseNameOf(path);
|
||||
if (isHash(string(p, 0, Hash::hashSize * 2)) &&
|
||||
p[Hash::hashSize * 2] == '-')
|
||||
p = string(p, Hash::hashSize * 2 + 1);
|
||||
if (isHash(string(p, 0, md5HashSize * 2)) &&
|
||||
p[md5HashSize * 2] == '-')
|
||||
p = string(p, md5HashSize * 2 + 1);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue