mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-09 15:56:25 +02:00
Code cleanup
This commit is contained in:
@@ -152,7 +152,7 @@ public class DownloadCommands
|
||||
|
||||
if (!Directory.Exists(directoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
_ = Directory.CreateDirectory(directoryPath);
|
||||
}
|
||||
|
||||
using FileStream? fileStream = new FileStream(filePath, FileMode.Create);
|
||||
|
||||
@@ -72,7 +72,7 @@ public class FileCommands
|
||||
string directoryPath = Path.Combine(ApiConfiguration.BasePath, "GeneratedFiles");
|
||||
if (!Directory.Exists(directoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
_ = Directory.CreateDirectory(directoryPath);
|
||||
}
|
||||
|
||||
hash = hash.Trim().ToLower();
|
||||
@@ -111,7 +111,7 @@ public class FileCommands
|
||||
string directoryPath = Path.Combine(ApiConfiguration.BasePath, "GeneratedFiles");
|
||||
if (!Directory.Exists(directoryPath))
|
||||
{
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
_ = Directory.CreateDirectory(directoryPath);
|
||||
}
|
||||
|
||||
hash = hash.Trim().ToLower();
|
||||
|
||||
@@ -72,7 +72,7 @@ public class HostCommands
|
||||
string portInput = parts[1];
|
||||
|
||||
_ = int.TryParse(portInput, out int port);
|
||||
if (port < 1000 || port >= 6000)
|
||||
if (port is < 1000 or >= 6000)
|
||||
{
|
||||
ApiManager.SendNotificationMessageNewLine("Invalid port number!", NotificationMessageType.Error);
|
||||
return;
|
||||
@@ -112,7 +112,7 @@ public class HostCommands
|
||||
|
||||
_ = int.TryParse(portInput, out int port);
|
||||
|
||||
if (port < 1000 || port >= 6000)
|
||||
if (port is < 1000 or >= 6000)
|
||||
{
|
||||
ApiManager.SendNotificationMessageNewLine("Invalid port number!", NotificationMessageType.Error);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user