X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.cpp;h=7a4975d19045ce2c4267986b1d2b8f4107460c50;hb=16d5c49b383841826d1bc563e2d392e12e497ed8;hp=34b55fa97fc39792c57ceb9246f5abac828f1356;hpb=68ab4023ccdf26022a053adc1bfaecef9fef58f4;p=lyx.git diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 34b55fa97f..7a4975d190 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -463,8 +463,13 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) case TC_INPUT: // Include file if (lexrc.next()) { + FileName tmp; string const inc = lexrc.getString(); - FileName tmp = libFileSearch("layouts", inc, + if (!path().empty() && (prefixIs(inc, "./") || + prefixIs(inc, "../"))) + tmp = fileSearch(path(), inc, "layout"); + else + tmp = libFileSearch("layouts", inc, "layout"); if (tmp.empty()) { @@ -545,7 +550,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) else { Layout lay; // false positive from coverity - // coverity[CHECKED_RETURN] + // coverity[checked_return] readStyle(lexrc, lay); } break;