mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update shared dialogs
This commit is contained in:
parent
04d3175473
commit
4837b08e7d
@ -316,7 +316,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
DeleteFilesByExtension(bowerPath, ".txt");
|
||||
DeleteFilesByExtension(bowerPath, ".map");
|
||||
DeleteFilesByExtension(bowerPath, ".md");
|
||||
DeleteFilesByExtension(bowerPath, ".json");
|
||||
DeleteFilesByExtension(bowerPath, ".json", "strings\\");
|
||||
DeleteFilesByExtension(bowerPath, ".gz");
|
||||
DeleteFilesByExtension(bowerPath, ".bat");
|
||||
DeleteFilesByExtension(bowerPath, ".sh");
|
||||
@ -401,7 +401,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteFilesByExtension(string path, string extension)
|
||||
private void DeleteFilesByExtension(string path, string extension, string exclude = null)
|
||||
{
|
||||
var files = _fileSystem.GetFiles(path, true)
|
||||
.Where(i => string.Equals(i.Extension, extension, StringComparison.OrdinalIgnoreCase))
|
||||
@ -409,6 +409,13 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(exclude))
|
||||
{
|
||||
if (file.FullName.IndexOf(exclude, StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
_fileSystem.DeleteFile(file.FullName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user