/// <summary>
/// we update these so that the file continues to look the same when you just open it in firefox
/// </summary>
private void UpdateSupportFiles()
{
if (IsPathReadonly(_folderPath))
{
Logger.WriteEvent("Not updating files in folder {0} because the directory is read-only.", _folderPath);
}
else
{
UpdateIfNewer("placeHolder.png");
UpdateIfNewer("basePage.css");
UpdateIfNewer("previewMode.css");
UpdateIfNewer("origami.css");
foreach (var path in Directory.GetFiles(_folderPath, "*.css"))
{
var file = Path.GetFileName(path);
//if (file.ToLower().Contains("portrait") || file.ToLower().Contains("landscape"))
UpdateIfNewer(file);
}
}
//by default, this comes from the collection, but the book can select one, inlucing "null" to select the factory-supplied empty xmatter
var nameOfXMatterPack = _dom.GetMetaValue("xMatter", _collectionSettings.XMatterPackName);
var helper = new XMatterHelper(_dom, nameOfXMatterPack, _fileLocator);
UpdateIfNewer(Path.GetFileName(helper.PathToStyleSheetForPaperAndOrientation), helper.PathToStyleSheetForPaperAndOrientation);
}