Fix download/upload timeout + Fix some warnings
This commit is contained in:
@@ -7,24 +7,27 @@ using System.Text.Json;
|
||||
|
||||
namespace OpenSaveCloudClient.Models
|
||||
{
|
||||
public class Configuration
|
||||
public class UserConfiguration
|
||||
{
|
||||
private static Configuration? instance;
|
||||
private static UserConfiguration? instance;
|
||||
private Dictionary<string, string> _values;
|
||||
|
||||
private Configuration()
|
||||
private UserConfiguration()
|
||||
{
|
||||
_values = new Dictionary<string, string>();
|
||||
Load();
|
||||
}
|
||||
|
||||
public static Configuration GetInstance()
|
||||
public static UserConfiguration Instance
|
||||
{
|
||||
if (instance == null)
|
||||
get
|
||||
{
|
||||
instance = new Configuration();
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new UserConfiguration();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void Load()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user