diff --git a/wbackup/Program.cs b/wbackup/Program.cs index ea62a17..2bf76de 100644 --- a/wbackup/Program.cs +++ b/wbackup/Program.cs @@ -8,6 +8,7 @@ using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Numerics; +using System.Text; using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.Tar; using System.Threading.Tasks; @@ -104,7 +105,9 @@ } int calclatedHashTemp = Interlocked.Increment(ref calclatedHashCnt); + consoleLock.WaitOne(); Console.Write("\rCalclate Hash. {0}/{1}", calclatedHashTemp, sourceFileCnt); + consoleLock.ReleaseMutex(); }); Console.WriteLine("Calclate Hash. {0}/{1}", calclatedHashCnt, sourceFileCnt); @@ -143,7 +146,7 @@ string zipFileName = param.destinationDir + "-" + postFixString + "-" + i.ToString("00") + ".tar.gz"; using (var fos = new FileStream(zipFileName, FileMode.Create, FileAccess.Write)) using (GZipOutputStream bzo = new GZipOutputStream(fos)) - using (TarOutputStream zos = new TarOutputStream(bzo)) + using (TarOutputStream zos = new TarOutputStream(bzo, Encoding.UTF8)) { bzo.IsStreamOwner = false; diff --git a/wbackup/wbackup.csproj b/wbackup/wbackup.csproj index 1ae653b..afaedd6 100644 --- a/wbackup/wbackup.csproj +++ b/wbackup/wbackup.csproj @@ -14,8 +14,13 @@ - + + + ..\..\SharpZipLib\src\ICSharpCode.SharpZipLib\bin\Debug\netstandard2\ICSharpCode.SharpZipLib.dll + + +