mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:37:22 +01:00
fix some minor issues
This commit is contained in:
parent
71afa6374e
commit
6b04452774
3 changed files with 44 additions and 7 deletions
|
|
@ -48,7 +48,21 @@ public sealed class Plugin : IDalamudPlugin
|
|||
.Select(f => new FileInfo(f))
|
||||
.OrderByDescending(f => f.LastWriteTimeUtc).Skip(9))
|
||||
{
|
||||
file.Delete();
|
||||
int attempts = 0;
|
||||
bool deleted = false;
|
||||
while (!deleted && attempts < 5)
|
||||
{
|
||||
try
|
||||
{
|
||||
file.Delete();
|
||||
deleted = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
attempts++;
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_host = new HostBuilder()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue