Allow listing the lyx file itself, fix bug 3707

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18477 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-05-23 19:24:06 +00:00
parent 4ef33baee9
commit f8b1ce4ada

View File

@ -416,7 +416,7 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
//FIXME RECURSIVE INCLUDE
//This isn't sufficient, as the inclusion could be downstream.
//But it'll have to do for now.
if (buffer.fileName() == included_file.toFilesystemEncoding()) {
if (!isListings(params_) && buffer.fileName() == included_file.toFilesystemEncoding()) {
Alert::error(_("Recursive input"),
bformat(_("Attempted to include file %1$s in itself! "
"Ignoring inclusion."), from_utf8(incfile)));