mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Improve platform checks
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using AutoFixture;
|
||||
using AutoFixture.AutoMoq;
|
||||
using Emby.Server.Implementations.IO;
|
||||
using MediaBrowser.Model.System;
|
||||
using Xunit;
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Tests.IO
|
||||
@@ -31,7 +31,7 @@ namespace Jellyfin.Server.Implementations.Tests.IO
|
||||
{
|
||||
var generatedPath = _sut.MakeAbsolutePath(folderPath, filePath);
|
||||
|
||||
if (MediaBrowser.Common.System.OperatingSystem.Id == OperatingSystemId.Windows)
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
var expectedWindowsPath = expectedAbsolutePath.Replace('/', '\\');
|
||||
Assert.Equal(expectedWindowsPath, generatedPath.Split(':')[1]);
|
||||
@@ -55,7 +55,7 @@ namespace Jellyfin.Server.Implementations.Tests.IO
|
||||
[SkippableFact]
|
||||
public void GetFileInfo_DanglingSymlink_ExistsFalse()
|
||||
{
|
||||
Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
|
||||
Skip.If(OperatingSystem.IsWindows());
|
||||
|
||||
string testFileDir = Path.Combine(Path.GetTempPath(), "jellyfin-test-data");
|
||||
string testFileName = Path.Combine(testFileDir, Path.GetRandomFileName() + "-danglingsym.link");
|
||||
|
||||
Reference in New Issue
Block a user