Skip to content

Commit

Permalink
Fix incorrect hash calculation for files in nested directories (#628)
Browse files Browse the repository at this point in the history
* Fix path to additional files in inner directories for hash calc

Example path: Game Options\AI\No Change.ini

* workaround for net48: substring
  • Loading branch information
pzhlkj6612 authored Jan 8, 2025
1 parent 5b5d226 commit d866451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DXMainClient/Online/FileHashCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void CalculateHashes()
{
if (path.Exists)
{
foreach (string filename in path.EnumerateFiles("*", SearchOption.AllDirectories).Select(s => s.Name))
foreach (string filename in path.EnumerateFiles("*", SearchOption.AllDirectories).Select(s => s.FullName.Substring(path.FullName.Length)))
{
string fileRelativePath = SafePath.CombineFilePath(path.Name, filename);
string fileFullPath = SafePath.CombineFilePath(path.FullName, filename);
Expand Down

0 comments on commit d866451

Please sign in to comment.