Author: alanmc
Date: 2008-01-03 08:26:50 -0500 (Thu, 03 Jan 2008)
New Revision: 92170
Modified:
trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs
Log:
Fix from roger zander: TorrentCreator specifies it needs read-only access for
MD5 hashes. It can now MD5 hash read-only files correctly.
Modified: trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs 2008-01-03
13:12:53 UTC (rev 92169)
+++ trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs 2008-01-03
13:26:50 UTC (rev 92170)
@@ -417,7 +417,7 @@
MD5 hasher = MD5.Create();
StringBuilder sb = new StringBuilder();
- using (FileStream stream = new FileStream(fileName, FileMode.Open))
+ using (FileStream stream = new FileStream(fileName, FileMode.Open,
FileAccess.Read, FileShare.Read))
{
byte[] hash = hasher.ComputeHash(stream);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches