From 4c3ee718f4b808cb1d41dd56c738ccb67f4c36ab Mon Sep 17 00:00:00 2001
From: 2dust <31833384+2dust@users.noreply.github.com>
Date: Sat, 2 Apr 2022 20:44:03 +0800
Subject: [PATCH] bug fix
---
clashN/clashN/Base/HttpClientHelper.cs | 6 ++++++
clashN/clashN/Handler/DownloadHandle.cs | 2 +-
clashN/clashN/clashN.csproj | 3 ---
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/clashN/clashN/Base/HttpClientHelper.cs b/clashN/clashN/Base/HttpClientHelper.cs
index 17f1476..a9a003f 100644
--- a/clashN/clashN/Base/HttpClientHelper.cs
+++ b/clashN/clashN/Base/HttpClientHelper.cs
@@ -152,6 +152,12 @@ namespace clashN.Base
}
}
} while (isMoreToRead);
+ file.Close();
+ if (canReportProgress)
+ {
+ progress.Report(101);
+
+ }
}
}
}
diff --git a/clashN/clashN/Handler/DownloadHandle.cs b/clashN/clashN/Handler/DownloadHandle.cs
index 25acc00..44b4034 100644
--- a/clashN/clashN/Handler/DownloadHandle.cs
+++ b/clashN/clashN/Handler/DownloadHandle.cs
@@ -51,7 +51,7 @@ namespace clashN.Handler
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));
}
};
diff --git a/clashN/clashN/clashN.csproj b/clashN/clashN/clashN.csproj
index 53bbfbd..549ad28 100644
--- a/clashN/clashN/clashN.csproj
+++ b/clashN/clashN/clashN.csproj
@@ -110,9 +110,6 @@
-
-
-
ResXFileCodeGenerator