]> git.lyx.org Git - lyx.git/commitdiff
Allow listing the lyx file itself, fix bug 3707
authorBo Peng <bpeng@lyx.org>
Wed, 23 May 2007 19:24:06 +0000 (19:24 +0000)
committerBo Peng <bpeng@lyx.org>
Wed, 23 May 2007 19:24:06 +0000 (19:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18477 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInclude.cpp

index 1b7ddf81a3dcd42d2a168855f3495a29071bf618..eca2ff60cd9eafb193c5f1f19101e859b1db2370 100644 (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)));