wasStitchNET
/Repository/Files.cs |
@@ -12,7 +12,7 @@ |
using System.Threading.Tasks; |
using wasDAVClient; |
using wasSharp; |
using wasSharp.Linq; |
using wasSharp.Sets; |
using wasSharp.Web.Utilities; |
using wasSharpNET.IO.Utilities; |
using wasStitchNET.Structures; |
@@ -34,23 +34,6 @@ |
{ |
Func<string, Task<StitchFile>> getStitchFile = async file => |
{ |
/*using (var memoryStream = new MemoryStream()) |
{ |
using (var stream = await client.Download(file)) |
{ |
await stream.CopyToAsync(memoryStream); |
} |
return new StitchFile |
{ |
Path = |
file.PathSplit(pathSeparator) |
.Select(WebExtensions.URLUnescapeDataString) |
.SequenceExcept( |
basePath.PathSplit(pathSeparator)), |
SHA1 = SHA1.Create().ToHex(memoryStream.ToArray()), |
PathType = StitchPathType.PATH_FILE |
}; |
}*/ |
using (var sha1managed = new SHA1Managed()) |
{ |
using (var stream = await client.Download(file)) |
/Repository/Stitching/Stitching.cs |
@@ -13,7 +13,7 @@ |
using System.Xml.Linq; |
using wasDAVClient; |
using wasSharp; |
using wasSharp.Linq; |
using wasSharp.Sets; |
using wasSharpNET.IO.Utilities; |
using wasStitchNET.Structures; |
using XML = wasStitchNET.Patchers.XML; |
@@ -370,7 +370,7 @@ |
|
// Retrive working file. |
var workingFilePath = string.Join(Path.DirectorySeparatorChar.ToString(), |
path, @"Corrade.ini"); |
path, Constants.WORKING_CONFIGURATION_FILE); |
|
StitchProgressUpdate("Parsing working file to be patched."); |
XDocument workingFile; |
@@ -389,7 +389,7 @@ |
try |
{ |
defaultFile = XDocument.Load(string.Join(Path.DirectorySeparatorChar.ToString(), |
path, @"Corrade.ini.default")); |
path, Constants.DEFAULT_CONFIGURATION_FILE)); |
} |
catch (Exception ex) |
{ |
@@ -420,7 +420,7 @@ |
if (!dryrun) |
File.Copy(workingFilePath, |
string.Join(Path.DirectorySeparatorChar.ToString(), |
path, @"Corrade.ini.bak"), true); |
path, Constants.BACKUP_CONFIGURATION_FILE), true); |
} |
catch (Exception ex) |
{ |
@@ -433,7 +433,7 @@ |
{ |
if (!dryrun) |
patchedFile.Save(string.Join(Path.DirectorySeparatorChar.ToString(), |
path, @"Corrade.ini")); |
path, Constants.WORKING_CONFIGURATION_FILE)); |
} |
catch (Exception ex) |
{ |
/Repository/Tools.cs |
@@ -12,7 +12,7 @@ |
using wasDAVClient; |
using wasDAVClient.Helpers; |
using wasSharp; |
using wasSharp.Linq; |
using wasSharp.Sets; |
using wasSharp.Web.Utilities; |
using wasSharpNET.Cryptography; |
using SHA1 = System.Security.Cryptography.SHA1; |