Per repository configuration

This commit is contained in:
Cyberboss
2017-09-20 15:43:31 -04:00
parent 15fe20f1f6
commit f3149e9b26
8 changed files with 276 additions and 76 deletions
+11 -1
View File
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace TGServerService
{
@@ -12,6 +11,16 @@ namespace TGServerService
//Everything in this file is just generic helpers
public static void CopyFileForceDirectories(string source, string dest, bool overwrite)
{
try
{
Directory.CreateDirectory(Path.GetDirectoryName(dest));
}
catch { } //we don't care if the above errors
File.Copy(source, dest, overwrite); //if this throws errors thats all we care about
}
//http://stackoverflow.com/questions/1701457/directory-delete-doesnt-work-access-denied-error-but-under-windows-explorer-it
public static void DeleteDirectory(string path, bool ContentsOnly = false, IList<string> excludeRoot = null)
{
@@ -30,6 +39,7 @@ namespace TGServerService
di.Delete(true);
}
}
static void NormalizeAndDelete(DirectoryInfo dir, IList<string> excludeRoot)
{
foreach (var subDir in dir.GetDirectories())