diff options
Diffstat (limited to 'src/htmlgen.cpp')
-rw-r--r-- | src/htmlgen.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index aec995f..a0a46d7 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -275,9 +275,16 @@ void HtmlGenerator::writeStyleInfo(int part) else // write user defined style sheet { QFileInfo cssfi(Config::htmlStyleSheet); - startPlainFile(cssfi.fileName()); - t << fileToString(Config::htmlStyleSheet); - endPlainFile(); + if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable()) + { + err("Error: style sheet %s does not exist or is not readable!", Config::htmlStyleSheet.data()); + } + else + { + startPlainFile(cssfi.fileName()); + t << fileToString(Config::htmlStyleSheet); + endPlainFile(); + } } } } |