A ton of random bugs and polish (#3668)
This commit is contained in:
parent
b45d92ea5c
commit
de651215f5
144 changed files with 852 additions and 848 deletions
|
@ -302,7 +302,8 @@ public class ThemeService : IThemeService
|
|||
var existingThemes = _directoryService.ScanFiles(_directoryService.SiteThemeDirectory, string.Empty);
|
||||
if (existingThemes.Any(f => Path.GetFileName(f) == dto.CssFile))
|
||||
{
|
||||
throw new KavitaException("Cannot download file, file already on disk");
|
||||
// This can happen if you delete then immediately download (to refresh). We should just delete the old file and download. Users can always rollback their version with github directly
|
||||
_directoryService.DeleteFiles(existingThemes.Where(f => Path.GetFileName(f) == dto.CssFile));
|
||||
}
|
||||
|
||||
var finalLocation = await DownloadSiteTheme(dto);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue