Fix download/upload timeout + Fix some warnings

This commit is contained in:
Aurélie Delhaie
2022-08-08 18:00:11 +02:00
parent e3d33a1af9
commit 40645a80a1
28 changed files with 71 additions and 52 deletions

View File

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.IO.Compression;
using System.Security.Cryptography;
using OpenSaveCloudClient.Core;
using System.Globalization;
namespace OpenSaveCloudClient.Models
{
@@ -96,7 +97,7 @@ namespace OpenSaveCloudClient.Models
byte[]? hashBytes = HashTool.HashDirectory(FolderPath);
if (hashBytes == null)
{
throw new Exception(String.Format("failed to get hash of directory '{0}'", FolderPath));
throw new Exception(message: string.Format(CultureInfo.CurrentCulture, "failed to get hash of directory '{0}'", FolderPath));
}
currentHash = BitConverter.ToString(hashBytes).Replace("-", "");
if (currentHash != hash)