mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Fix pipe path for unix.
Replace fixed '/tmp' with Path.GetTempPath().
Former-commit-id: 4ecf05ec79
This commit is contained in:
parent
3d29220528
commit
2fcf389aba
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,8 @@ namespace FFMpegCore.Pipes
|
|||
{
|
||||
static class PipeHelpers
|
||||
{
|
||||
static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_");
|
||||
|
||||
public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid();
|
||||
|
||||
public static string GetPipePath(string pipeName)
|
||||
|
@ -12,7 +14,7 @@ public static string GetPipePath(string pipeName)
|
|||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return $@"\\.\pipe\{pipeName}";
|
||||
else
|
||||
return $"unix:/tmp/CoreFxPipe_{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390
|
||||
return $"unix:{PipePrefix}{pipeName}"; // dotnet uses unix sockets on unix, for more see https://github.com/dotnet/runtime/issues/24390
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue