Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bod9001 committed Nov 12, 2023
1 parent f34c07b commit b7a969c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ private async Task<SandboxConfig> LoadConfig()
var resourceName = "UnitystationLauncher.CodeScanList.json";
using (var stream = assembly.GetManifestResourceStream(resourceName))
{
// Copy the contents of the resource to a file location
using (var fileStream = File.Create(configPath))
if (stream != null)
{
stream.Seek(0L, SeekOrigin.Begin);
await stream.CopyToAsync(fileStream);
// Copy the contents of the resource to a file location
using (var fileStream = File.Create(configPath))
{
stream.Seek(0L, SeekOrigin.Begin);
await stream.CopyToAsync(fileStream);
}
}
}
Log.Error("had to use backup config");
Expand Down
2 changes: 1 addition & 1 deletion UnitystationLauncher/Models/Api/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public Server(string forkName, int buildVersion, string serverIp, int serverPort
public string? OsxDownload { get; set; }
public string? LinuxDownload { get; set; }

public string ServerGoodFileVersion { get; set; }
public string ServerGoodFileVersion { get; set; } = string.Empty;

public (string, int) ForkAndVersion => (ForkName, BuildVersion);

Expand Down
2 changes: 1 addition & 1 deletion UnitystationLauncher/Services/CodeScanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task<bool> OnScan(ZipArchive archive, string targetDirectory, strin



DirectoryInfo stagingManaged = null;
DirectoryInfo? stagingManaged = null;
if (_environmentService.GetCurrentEnvironment() != CurrentEnvironment.MacOsStandalone)
{
// Get all files in the directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ namespace UnitystationLauncher.Services;
public static class HubBuildCommunicationPipeService
{

private static PipeHubBuildCommunication coolPipeHubBuildCommunication;
private static PipeHubBuildCommunication? _coolPipeHubBuildCommunication;

public static void Init()
{
var data = new PipeHubBuildCommunication();
_ = data.StartServerPipe();
coolPipeHubBuildCommunication = data;
_coolPipeHubBuildCommunication = data;
}


Expand Down
4 changes: 2 additions & 2 deletions UnitystationLauncher/ViewModels/ServersPanelViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ServersPanelViewModel(IInstallationService installationService, IPingServ

DownloadCommand = ReactiveCommand.Create<ServerViewModel, Unit>(server =>
{
DownloadServer(server.Server);
_ = DownloadServer(server.Server);
return Unit.Default;
});

Expand Down Expand Up @@ -121,7 +121,7 @@ private async Task DownloadServer(Server server)

if (download == null)
{
MessageBoxBuilder.CreateMessageBox(MessageBoxButtons.Ok, "Problem downloading server",
_ = MessageBoxBuilder.CreateMessageBox(MessageBoxButtons.Ok, "Problem downloading server",
downloadFailReason).Show();
return;
}
Expand Down

0 comments on commit b7a969c

Please sign in to comment.