aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common/Compute.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-03 23:10:50 -0500
committerJP Dillingham <jp@dillingham.me>2026-06-03 23:10:50 -0500
commit70520ee0e09526cd86a4bdf6573cbc6f3af717da (patch)
tree98f4769cee54c44cd060d49764fe6c09372da78c /src/slskd/Common/Compute.cs
parente479f3a213d13cb8b165237a594bcb86b7462606 (diff)
downloadslskd-70520ee0e09526cd86a4bdf6573cbc6f3af717da.tar.gz
add our own OperatingSystem enum because why not at this point
Diffstat (limited to 'src/slskd/Common/Compute.cs')
-rw-r--r--src/slskd/Common/Compute.cs18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/slskd/Common/Compute.cs b/src/slskd/Common/Compute.cs
index dc565806..d235a87c 100644
--- a/src/slskd/Common/Compute.cs
+++ b/src/slskd/Common/Compute.cs
@@ -66,24 +66,14 @@ namespace slskd
return BitConverter.ToString(sha256.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty);
}
- public static OSPlatform OSPlatform()
+ public static OperatingSystem OperatingSystem()
{
- if (OperatingSystem.IsWindows())
+ if (System.OperatingSystem.IsWindows())
{
- return System.Runtime.InteropServices.OSPlatform.Windows;
+ return slskd.OperatingSystem.Windows;
}
- if (OperatingSystem.IsMacOS())
- {
- return System.Runtime.InteropServices.OSPlatform.OSX;
- }
-
- if (OperatingSystem.IsFreeBSD())
- {
- return System.Runtime.InteropServices.OSPlatform.FreeBSD;
- }
-
- return System.Runtime.InteropServices.OSPlatform.Linux;
+ return slskd.OperatingSystem.Linux;
}
}
} \ No newline at end of file