Fix GetPipePath() for MacOS

Former-commit-id: 75e4f6f257
This commit is contained in:
ep1kt3t0s 2022-12-11 17:05:58 +00:00 committed by Malte Rosenbjerg
parent 5623119b35
commit 53f0c7917d

View file

@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace FFMpegCore.Pipes
@ -11,8 +12,9 @@ public static string GetPipePath(string pipeName)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return $@"\\.\pipe\{pipeName}";
else
return $"unix:/tmp/CoreFxPipe_{pipeName}";
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
return $"unix:{Path.GetTempPath()}/CoreFxPipe_{pipeName}";
return $"unix:/tmp/CoreFxPipe_{pipeName}";
}
}
}