Jean-Marc,
this patch against 1.4 improves the error message for missing layout include
files. Currently LyX says "Cannot read layout file `'.", because
LibFileSearch returns an empty string if it can not find the file.
OK to go in?
Georg
Index: src/lyxtextclass.C
===================================================================
--- src/lyxtextclass.C (Revision 15232)
+++ src/lyxtextclass.C (Arbeitskopie)
@@ -251,11 +251,15 @@ bool LyXTextClass::Read(string const & f
case TC_INPUT: // Include file
if (lexrc.next()) {
- string tmp = LibFileSearch("layouts",
- lexrc.getString(),
+ string const inc = lexrc.getString();
+ string tmp = LibFileSearch("layouts", inc,
"layout");
- if (Read(tmp, true)) {
+ if (tmp.empty()) {
+ lexrc.printError("Could not find input"
+ "file: " + inc);
+ error = true;
+ } else if (Read(tmp, true)) {
lexrc.printError("Error reading input"
"file: "+tmp);
error = true;