Author: alanmc
Date: 2008-01-19 19:11:53 -0500 (Sat, 19 Jan 2008)
New Revision: 93330
Modified:
trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs
Log:
Patch from Matej Skubic to make sure the 'private' key is retained through
subsequent calls.
Modified: trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs 2008-01-19
23:44:44 UTC (rev 93329)
+++ trunk/bitsharp/src/MonoTorrent/Common/TorrentCreator.cs 2008-01-20
00:11:53 UTC (rev 93330)
@@ -639,6 +639,10 @@
{
this.torrent.Add("info", new BEncodedDictionary());
((BEncodedDictionary)this.torrent["info"]).Add("piece length",
oldInfo["piece length"]);
+
+ //restore private value
+ if (oldInfo.ContainsKey("private"))
+ ((BEncodedDictionary)this.torrent["info"]).Add("private",
oldInfo["private"]);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches