mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-20 00:02:28 +00:00
Add some resource tests and other small changes (#638)
* Cleanup custom icon resources and add resource tests * Don't delete old custom icons
This commit is contained in:
parent
87ceca9c63
commit
ace3678da7
4 changed files with 105 additions and 49 deletions
|
@ -1,5 +1,6 @@
|
|||
#nullable enable
|
||||
using LBPUnion.ProjectLighthouse.Administration.Reports;
|
||||
using LBPUnion.ProjectLighthouse.Files;
|
||||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -35,14 +36,7 @@ public class AdminReportController : ControllerBase
|
|||
hashes.Add(report.InitialStateHash);
|
||||
foreach (string hash in hashes)
|
||||
{
|
||||
if (System.IO.File.Exists(Path.Combine("png", $"{hash}.png")))
|
||||
{
|
||||
System.IO.File.Delete(Path.Combine("png", $"{hash}.png"));
|
||||
}
|
||||
if (System.IO.File.Exists(Path.Combine("r", hash)))
|
||||
{
|
||||
System.IO.File.Delete(Path.Combine("r", hash));
|
||||
}
|
||||
FileHelper.DeleteResource(hash);
|
||||
}
|
||||
this.database.Reports.Remove(report);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue