You've already forked linux-packaging-mono
Imported Upstream version 6.6.0.108
Former-commit-id: 00c6fff7917ab7dddc0c67044b046850c2283096
This commit is contained in:
parent
4c26f54a2f
commit
9050bbfc26
24
external/ikvm/reflect/Emit/AssemblyBuilder.cs
vendored
24
external/ikvm/reflect/Emit/AssemblyBuilder.cs
vendored
@@ -472,21 +472,23 @@ namespace IKVM.Reflection.Emit
|
||||
|
||||
private int AddFile(ModuleBuilder manifestModule, string fileName, int flags)
|
||||
{
|
||||
SHA1Managed hash = new SHA1Managed();
|
||||
string fullPath = fileName;
|
||||
if (dir != null)
|
||||
using (var hash = SHA1.Create())
|
||||
{
|
||||
fullPath = Path.Combine(dir, fileName);
|
||||
}
|
||||
using (FileStream fs = new FileStream(fullPath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(Stream.Null, hash, CryptoStreamMode.Write))
|
||||
string fullPath = fileName;
|
||||
if (dir != null)
|
||||
{
|
||||
byte[] buf = new byte[8192];
|
||||
ModuleWriter.HashChunk(fs, cs, buf, (int)fs.Length);
|
||||
fullPath = Path.Combine(dir, fileName);
|
||||
}
|
||||
using (FileStream fs = new FileStream(fullPath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
using (CryptoStream cs = new CryptoStream(Stream.Null, hash, CryptoStreamMode.Write))
|
||||
{
|
||||
byte[] buf = new byte[8192];
|
||||
ModuleWriter.HashChunk(fs, cs, buf, (int)fs.Length);
|
||||
}
|
||||
}
|
||||
return manifestModule.__AddModule(flags, Path.GetFileName(fileName), hash.Hash);
|
||||
}
|
||||
return manifestModule.__AddModule(flags, Path.GetFileName(fileName), hash.Hash);
|
||||
}
|
||||
|
||||
public void AddResourceFile(string name, string fileName)
|
||||
|
Reference in New Issue
Block a user