Always use Path.GetTempPath() on linux and macos

This commit is contained in:
Malte Rosenbjerg 2023-01-31 23:10:09 +01:00
parent fd56655995
commit 1b729280b6

View file

@ -12,9 +12,7 @@ public static string GetPipePath(string pipeName)
{ {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return $@"\\.\pipe\{pipeName}"; return $@"\\.\pipe\{pipeName}";
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) return $"unix:{Path.Combine(Path.GetTempPath(), $"CoreFxPipe_{pipeName}")}";
return $"unix:{Path.GetTempPath()}/CoreFxPipe_{pipeName}";
return $"unix:/tmp/CoreFxPipe_{pipeName}";
} }
} }
} }