Skip to content

Commit

Permalink
Fixed: Posix cleanup shouldn't run on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jul 23, 2023
1 parent 8f8d6d5 commit 59faa19
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ private static void Cleanup()
// because the OS does not auto dispose them.
#pragma warning disable RCS1075
#pragma warning disable CA1416
CleanupPosix(UnixMemoryMappedFile.BaseDir, (path) =>
if (Polyfills.IsMacOS() || Polyfills.IsLinux())
{
try { File.Delete(path); }
catch (Exception) { /* Ignored */ }
});
CleanupPosix(UnixMemoryMappedFile.BaseDir, (path) =>
{
try { File.Delete(path); }
catch (Exception) { /* Ignored */ }
});
}
#pragma warning restore RCS1075
#pragma warning restore CA1416
}
Expand Down

0 comments on commit 59faa19

Please sign in to comment.