Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pugh <dpugh@microsoft.com>2017-03-24 21:18:39 +0300
committerDavid Pugh <dpugh@microsoft.com>2017-03-24 21:18:39 +0300
commitdf678651a64bb72a1cda01c591bcf67aa5936471 (patch)
tree176980917870c2ed273572b33c6c03388fc13220 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor
parent031d32e83517d8579246c7dec06374d778e398eb (diff)
parent0ba7d6f3fbe6d7e84ead8ea94f0543ebdc514a6c (diff)
Merge remote-tracking branch 'origin/vNext-webtools-platform' into dev/dpugh/addtextview
# Conflicts: # main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/AutoSave.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/AutoSave.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/AutoSave.cs
index ebdda80162..ca8fba7763 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/AutoSave.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/AutoSave.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
+using System.Text;
using System.Collections.Generic;
using System.IO;
using System.Threading;
@@ -32,6 +33,7 @@ using MonoDevelop.Core;
using Gtk;
using MonoDevelop.Core.Text;
using System.Threading.Tasks;
+using System.Security.Cryptography;
namespace MonoDevelop.Ide.Editor
{
@@ -62,7 +64,17 @@ namespace MonoDevelop.Ide.Editor
{
if (fileName == null)
return null;
- return Path.Combine (autoSavePath, MonoDevelop.Ide.TypeSystem.PersistenceServiceFactory.GetMD5 (fileName) + ".sav");
+ return Path.Combine (autoSavePath, GetMD5 (fileName) + ".sav");
+ }
+
+ static MD5 md5 = MD5.Create ();
+ static string GetMD5 (string data)
+ {
+ var result = new StringBuilder();
+ foreach (var b in md5.ComputeHash (Encoding.ASCII.GetBytes (data))) {
+ result.Append(b.ToString("X2"));
+ }
+ return result.ToString();
}
/// <summary>