fix startup issues when csv bak cannot be written
This commit is contained in:
@@ -29,9 +29,18 @@ public sealed class FileCacheManager : IDisposable
|
||||
|
||||
lock (_fileWriteLock)
|
||||
{
|
||||
if (File.Exists(CsvBakPath))
|
||||
try
|
||||
{
|
||||
File.Move(CsvBakPath, _csvPath, overwrite: true);
|
||||
if (File.Exists(CsvBakPath))
|
||||
{
|
||||
File.Move(CsvBakPath, _csvPath, overwrite: true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to move BAK to ORG, deleting BAK");
|
||||
if (File.Exists(CsvBakPath))
|
||||
File.Delete(CsvBakPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>0.8.13</Version>
|
||||
<Version>0.8.14</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||
|
||||
Reference in New Issue
Block a user