mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-04-11 11:41:47 -04:00
Fixed an issue when trying to delete a theme file where temp/ already had a copy, Kavita wouldn't delete.
This commit is contained in:
parent
0fdfd0451c
commit
3c250c656b
@ -505,7 +505,13 @@ public class ThemeService : IThemeService
|
||||
_directoryService.FileSystem.Path.Join(_directoryService.SiteThemeDirectory, theme.FileName);
|
||||
var newLocation =
|
||||
_directoryService.FileSystem.Path.Join(_directoryService.TempDirectory, theme.FileName);
|
||||
_directoryService.CopyFileToDirectory(existingLocation, newLocation);
|
||||
|
||||
if (!_directoryService.FileSystem.File.Exists(newLocation))
|
||||
{
|
||||
_logger.LogInformation("Copying Deleted theme file ({FileName}) to config/temp, it will be removed at midnight", theme.FileName);
|
||||
_directoryService.CopyFileToDirectory(existingLocation, newLocation);
|
||||
}
|
||||
|
||||
_directoryService.DeleteFiles([existingLocation]);
|
||||
}
|
||||
catch (Exception) { /* Swallow */ }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user