fixed some path separators

This commit is contained in:
Timerix22 2022-08-15 19:59:54 +06:00
parent 7f5d095f0f
commit ce27d3cb49
3 changed files with 7 additions and 11 deletions

View File

@ -137,10 +137,10 @@ public class FSP
public void DownloadByManifest(string dirOnServer, string dirOnClient, bool overwrite = false, bool delete_excess = false) public void DownloadByManifest(string dirOnServer, string dirOnClient, bool overwrite = false, bool delete_excess = false)
{ {
if (!dirOnClient.EndsWith("\\")) if (!dirOnClient.EndsWith(Путь.Разд))
dirOnClient += "\\"; dirOnClient += Путь.Разд;
if (!dirOnServer.EndsWith("\\")) if (!dirOnServer.EndsWith(Путь.Разд))
dirOnServer += "\\"; dirOnServer += Путь.Разд;
Debug("b", "downloading manifest <", "c", dirOnServer + "manifest.dtsod", "b", ">"); Debug("b", "downloading manifest <", "c", dirOnServer + "manifest.dtsod", "b", ">");
var manifest = new DtsodV23(DownloadFileToMemory(dirOnServer + "manifest.dtsod").BytesToString()); var manifest = new DtsodV23(DownloadFileToMemory(dirOnServer + "manifest.dtsod").BytesToString());
Debug("g", $"found {manifest.Values.Count} files in manifest"); Debug("g", $"found {manifest.Values.Count} files in manifest");
@ -177,8 +177,8 @@ public class FSP
public static void CreateManifest(string dir) public static void CreateManifest(string dir)
{ {
if (!dir.EndsWith("\\")) if (!dir.EndsWith(Путь.Разд))
dir += "\\"; dir += Путь.Разд;
Log($"b", $"creating manifest of {dir}"); Log($"b", $"creating manifest of {dir}");
StringBuilder manifestBuilder = new(); StringBuilder manifestBuilder = new();
Hasher hasher = new(); Hasher hasher = new();

View File

@ -11,7 +11,7 @@ public class FileLogger : IDisposable
} }
public FileLogger(string dir, string programName) public FileLogger(string dir, string programName)
: this($"{dir}\\{programName}_{DateTime.Now}.log".Replace(':', '-').Replace(' ', '_')) { } : this($"{dir}{Путь.Разд}{programName}_{DateTime.Now}.log".Replace(':', '-').Replace(' ', '_')) { }
public string LogfileName { get; protected set; } public string LogfileName { get; protected set; }
public System.IO.FileStream LogfileStream { get; protected set; } public System.IO.FileStream LogfileStream { get; protected set; }

View File

@ -1,4 +0,0 @@
printf "
first line
second line
"