update shared dialogs

This commit is contained in:
Luke Pulverenti 2016-05-13 02:22:02 -04:00
parent 04d3175473
commit 4837b08e7d

View File

@ -316,7 +316,7 @@ namespace MediaBrowser.WebDashboard.Api
DeleteFilesByExtension(bowerPath, ".txt"); DeleteFilesByExtension(bowerPath, ".txt");
DeleteFilesByExtension(bowerPath, ".map"); DeleteFilesByExtension(bowerPath, ".map");
DeleteFilesByExtension(bowerPath, ".md"); DeleteFilesByExtension(bowerPath, ".md");
DeleteFilesByExtension(bowerPath, ".json"); DeleteFilesByExtension(bowerPath, ".json", "strings\\");
DeleteFilesByExtension(bowerPath, ".gz"); DeleteFilesByExtension(bowerPath, ".gz");
DeleteFilesByExtension(bowerPath, ".bat"); DeleteFilesByExtension(bowerPath, ".bat");
DeleteFilesByExtension(bowerPath, ".sh"); 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) var files = _fileSystem.GetFiles(path, true)
.Where(i => string.Equals(i.Extension, extension, StringComparison.OrdinalIgnoreCase)) .Where(i => string.Equals(i.Extension, extension, StringComparison.OrdinalIgnoreCase))
@ -409,6 +409,13 @@ namespace MediaBrowser.WebDashboard.Api
foreach (var file in files) foreach (var file in files)
{ {
if (!string.IsNullOrWhiteSpace(exclude))
{
if (file.FullName.IndexOf(exclude, StringComparison.OrdinalIgnoreCase) != -1)
{
continue;
}
}
_fileSystem.DeleteFile(file.FullName); _fileSystem.DeleteFile(file.FullName);
} }
} }