1
0
Fork 0
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:
Eelco Dolstra 2005-01-13 15:44:44 +00:00
parent d46b4262dc
commit 73992371a3
6 changed files with 36 additions and 18 deletions

View file

@ -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;
}