Skip to content

Commit

Permalink
Modify Path.GetRelativePath()
Browse files Browse the repository at this point in the history
which is not introduced in .NET Standard 2.0
  • Loading branch information
SadPencil committed Nov 8, 2023
1 parent c90373d commit e426b24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DXMainClient/Online/FileHashCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ public void CalculateHashes(List<GameMode> gameModes)
{
string sha1 = Utilities.CalculateSHA1ForFile(filePath);
fh.INIHashes += sha1;
Logger.Log("Hash for " + Path.GetRelativePath(ProgramConstants.GamePath, filePath) + ": " + sha1);

string fileRelativePath = filePath;
if (filePath.StartsWith(ProgramConstants.GamePath))
fileRelativePath = fileRelativePath.Substring(ProgramConstants.GamePath.Length).TrimStart(Path.DirectorySeparatorChar);

Logger.Log("Hash for " + fileRelativePath + ": " + sha1);
}
}
}
Expand Down

0 comments on commit e426b24

Please sign in to comment.