Skip to content

Commit

Permalink
Remove now-unnecessary path hash from backup file name since names ar…
Browse files Browse the repository at this point in the history
…e unique again.
  • Loading branch information
jherby2k committed Nov 27, 2018
1 parent f16f28f commit 3c480c7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/coverlet.core/Helpers/InstrumentationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private static string GetBackupPath(string module, string identifier)
{
return Path.Combine(
Path.GetTempPath(),
Path.GetFileNameWithoutExtension(module) + "_" + GetPathHash(Path.GetDirectoryName(module)) + "_" + identifier + ".dll"
Path.GetFileNameWithoutExtension(module) + "_" + identifier + ".dll"
);
}

Expand Down Expand Up @@ -317,13 +317,6 @@ private static bool IsAssembly(string filePath)
return false;
}
}

private static string GetPathHash(string path)
{
using (var md5 = MD5.Create())
return BitConverter.ToString(md5.ComputeHash(Encoding.Unicode.GetBytes(path)))
.Replace("-", string.Empty);
}
}
}

0 comments on commit 3c480c7

Please sign in to comment.