private void UpdateSupportFiles()
{
if (IsPathReadonly(_folderPath))
{
Logger.WriteEvent("Not updating files in folder {0} because the directory is read-only.", _folderPath);
}
else
{
Update("placeHolder.png");
Update("basePage.css");
Update("previewMode.css");
Update("origami.css");
Update("languageDisplay.css");
foreach (var path in Directory.GetFiles(_folderPath, "*.css"))
{
var file = Path.GetFileName(path);
//if (file.ToLower().Contains("portrait") || file.ToLower().Contains("landscape"))
Update(file);
}
}
//by default, this comes from the collection, but the book can select one, including "null" to select the factory-supplied empty xmatter
var nameOfXMatterPack = _dom.GetMetaValue("xMatter", _collectionSettings.XMatterPackName);
nameOfXMatterPack = HandleRetiredXMatterPacks(_dom, nameOfXMatterPack);
try
{
var helper = new XMatterHelper(_dom, nameOfXMatterPack, _fileLocator);
Update(Path.GetFileName(helper.PathToStyleSheetForPaperAndOrientation), helper.PathToStyleSheetForPaperAndOrientation);
}
catch (Exception error)
{
ErrorMessagesHtml = WebUtility.HtmlEncode(error.Message);
}
}