fixes to upload logic

This commit is contained in:
Stanley Dimant
2022-11-03 10:16:58 +01:00
parent ad298109f4
commit 5694eb7d08
3 changed files with 32 additions and 12 deletions

View File

@@ -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