mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-05 20:15:00 +03:00
Fix ?!
This commit is contained in:
@@ -15,11 +15,19 @@
|
||||
this.version = $"{major}.{minor}.{patch}";
|
||||
}
|
||||
|
||||
public SemanticVersion(string version)
|
||||
public SemanticVersion(string? version)
|
||||
{
|
||||
this.version = version.RemovePrefix('v');
|
||||
try
|
||||
{
|
||||
if (version.IsNullOrEmpty())
|
||||
{
|
||||
this.major = 0;
|
||||
this.minor = 0;
|
||||
this.patch = 0;
|
||||
return;
|
||||
}
|
||||
this.version = version.RemovePrefix('v');
|
||||
|
||||
string[] parts = this.version.Split('.');
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
@@ -43,7 +51,6 @@
|
||||
this.major = 0;
|
||||
this.minor = 0;
|
||||
this.patch = 0;
|
||||
//this.version = "0.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -158,10 +158,11 @@ namespace ServiceLib.Common
|
||||
/// </summary>
|
||||
/// <param name="plainText"></param>
|
||||
/// <returns></returns>
|
||||
public static string Base64Decode(string plainText)
|
||||
public static string Base64Decode(string? plainText)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (plainText.IsNullOrEmpty()) return "";
|
||||
plainText = plainText.Trim()
|
||||
.Replace(Environment.NewLine, "")
|
||||
.Replace("\n", "")
|
||||
@@ -365,7 +366,7 @@ namespace ServiceLib.Common
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsBase64String(string plainText)
|
||||
public static bool IsBase64String(string? plainText)
|
||||
{
|
||||
if (plainText.IsNullOrEmpty()) return false;
|
||||
var buffer = new Span<byte>(new byte[plainText.Length]);
|
||||
@@ -812,7 +813,7 @@ namespace ServiceLib.Common
|
||||
}
|
||||
if (coreType != null)
|
||||
{
|
||||
_tempPath = Path.Combine(_tempPath, coreType.ToString()!);
|
||||
_tempPath = Path.Combine(_tempPath, coreType.ToString());
|
||||
if (!Directory.Exists(_tempPath))
|
||||
{
|
||||
Directory.CreateDirectory(_tempPath);
|
||||
|
||||
Reference in New Issue
Block a user