mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:47:21 +01:00
fixes to upload logic
This commit is contained in:
parent
ad298109f4
commit
5694eb7d08
3 changed files with 32 additions and 12 deletions
|
|
@ -25,7 +25,7 @@ public class FileReplacement
|
|||
|
||||
public bool IsFileSwap => !Regex.IsMatch(ResolvedPath, @"^[a-zA-Z]:(/|\\)", RegexOptions.ECMAScript) && !string.Equals(GamePaths.First(), ResolvedPath, System.StringComparison.Ordinal);
|
||||
|
||||
public string Hash { get; set; } = string.Empty;
|
||||
public string Hash { get; private set; } = string.Empty;
|
||||
|
||||
public string ResolvedPath { get; set; } = string.Empty;
|
||||
|
||||
|
|
@ -41,6 +41,14 @@ public class FileReplacement
|
|||
});
|
||||
}
|
||||
|
||||
public bool Verify()
|
||||
{
|
||||
var cache = fileDbManager.GetFileCacheByPath(ResolvedPath);
|
||||
if (cache == null) return false;
|
||||
Hash = cache.Hash;
|
||||
return true;
|
||||
}
|
||||
|
||||
public FileReplacementDto ToFileReplacementDto()
|
||||
{
|
||||
return new FileReplacementDto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue