Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Apr 2, 2022
1 parent c2f51e6 commit 4c3ee71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions clashN/clashN/Base/HttpClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ public async Task DownloadFileAsync(HttpClient client, string url, string fileNa
}
}
} while (isMoreToRead);
file.Close();
if (canReportProgress)
{
progress.Report(101);

}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion clashN/clashN/Handler/DownloadHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void DownloadFileAsync(string url, bool blProxy, int downloadTimeout)
if (UpdateCompleted != null)
{
string msg = string.Format("...{0}%", value);
UpdateCompleted(this, new ResultEventArgs(value == 100 ? true : false, msg));
UpdateCompleted(this, new ResultEventArgs(value > 100 ? true : false, msg));
}
};

Expand Down
3 changes: 0 additions & 3 deletions clashN/clashN/clashN.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<Folder Include="Sample\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down

0 comments on commit 4c3ee71

Please sign in to comment.