[backend/startup] Delete ASPNETCORE_TEMP writability test file on close

This commit is contained in:
Laura Hausmann 2025-01-09 13:15:55 +01:00
parent c335a44327
commit 26bb26c0da
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -274,7 +274,7 @@ public static class WebApplicationExtensions
var tempPath = Environment.GetEnvironmentVariable("ASPNETCORE_TEMP") ?? Path.GetTempPath();
try
{
await using var stream = File.OpenWrite(Path.Combine(tempPath, ".iceshrimp-test"));
await using var stream = File.Create(Path.Combine(tempPath, ".iceshrimp-test"), 1, FileOptions.DeleteOnClose);
}
catch
{