1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00

Revert "use no null when true"

This reverts commit 6ad8339c66.
This commit is contained in:
cdwcgt 2023-08-09 19:11:36 +09:00
parent c88045dfc7
commit 5898a9986b
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Microsoft.Win32; using Microsoft.Win32;
@ -181,7 +180,7 @@ namespace osu.Game.Tournament.IPC
/// <returns>Whether an IPC directory was successfully auto-detected.</returns> /// <returns>Whether an IPC directory was successfully auto-detected.</returns>
public bool AutoDetectIPCLocation() => SetIPCLocation(findStablePath()); public bool AutoDetectIPCLocation() => SetIPCLocation(findStablePath());
private static bool ipcFileExistsInDirectory([NotNullWhen(true)] string? p) => p != null && File.Exists(Path.Combine(p, "ipc.txt")); private static bool ipcFileExistsInDirectory(string? p) => p != null && File.Exists(Path.Combine(p, "ipc.txt"));
private string? findStablePath() private string? findStablePath()
{ {
@ -202,7 +201,7 @@ namespace osu.Game.Tournament.IPC
string? stableInstallPath = Environment.GetEnvironmentVariable("OSU_STABLE_PATH"); string? stableInstallPath = Environment.GetEnvironmentVariable("OSU_STABLE_PATH");
if (ipcFileExistsInDirectory(stableInstallPath)) if (ipcFileExistsInDirectory(stableInstallPath))
return stableInstallPath; return stableInstallPath!;
} }
catch catch
{ {