Skip to content

Commit 309a82c

Browse files
committed
fix: Upgrade decompression garbled issue.
1 parent 54c5f4b commit 309a82c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/Server/Program.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@
33
var builder = WebApplication.CreateBuilder(args);
44
var app = builder.Build();
55

6+
string packageName = "packet_20250102230201638_1.0.0.1";
7+
68
app.MapPost("/Report", (ReportDTO request) =>
79
{
810
return HttpResponseDTO<bool>.Success(true,"has update.");
911
});
1012

1113
app.MapPost("/Verification", (VerifyDTO request) =>
1214
{
13-
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "packages", "packet_20241125233523804_1.0.0.1.zip");
15+
var filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "wwwroot", "packages", $"{packageName}.zip");
1416
var packet = new FileInfo(filePath);
1517
var result = new List<VerificationResultDTO>
1618
{
1719
new VerificationResultDTO
1820
{
1921
RecordId = 1,
20-
Name = "packet_20241125233523804_1.0.0.1",
21-
Hash = "6c1ef824df2443b95e93c51d91de1c77447884602da2275a182a610a9429a835",
22+
Name = packageName,
23+
Hash = "ad1a85a9169ca0083ab54ba390e085c56b9059efc3ca8aa1ec9ed857683cc4b1",
2224
ReleaseDate = DateTime.Now,
23-
Url = "http://localhost:5000/packages/packet_20241125233523804_1.0.0.1.zip",
25+
Url = $"http://localhost:5000/packages/{packageName}.zip",
2426
Version = "1.0.0.1",
2527
AppType = 1,
2628
Platform = 1,

src/Server/ServerSample.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<ItemGroup>
1414
<None Remove="build.bat" />
1515
<None Remove="ServerSample\**" />
16-
<None Update="packages\packet_20241125233523804_1.0.0.1.zip">
16+
<None Update="packages\packet_20250102230201638_1.0.0.1.zip">
1717
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1818
</None>
19-
<None Include="wwwroot\packages\packet_20241125233523804_1.0.0.1.zip">
19+
<None Include="wwwroot\packages\packet_20250102230201638_1.0.0.1.zip">
2020
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2121
</None>
2222
</ItemGroup>
-453 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)