PublicLog

This commit is contained in:
2022-07-01 19:38:15 +03:00
parent 72142634a9
commit d99177ae63
12 changed files with 92 additions and 89 deletions

View File

@@ -151,16 +151,15 @@ public class FSP
Debug("b", "file <", "c", fileOnClient, "b", ">... ");
if (!File.Exists(fileOnClient))
{
DebugNoTime("y", "doesn't exist");
Debug("y", "doesn't exist");
DownloadFile(dirOnServer + fileOnServer, fileOnClient);
}
else if (overwrite && hasher.HashFile(fileOnClient).HashToString() != manifest[fileOnServer])
{
DebugNoTime("y", "outdated");
Debug("y", "outdated");
DownloadFile(dirOnServer + fileOnServer, fileOnClient);
}
else
DebugNoTime("g", "without changes");
else Debug("g", "without changes");
}
// удаление лишних файлов
if (delete_excess)
@@ -202,8 +201,4 @@ public class FSP
{
if (debug) Log(msg);
}
static void DebugNoTime(params string[] msg)
{
if (debug) LogNoTime(msg);
}
}

View File

@@ -6,7 +6,7 @@ global using System.Linq;
global using System.Text;
global using DTLib.Extensions;
global using DTLib.Filesystem;
global using static DTLib.PublicLog;
global using static DTLib.Logging.PublicLog;
using System.Diagnostics;
using System.Net.Http;