From c0b5fb6a804da3497b78dfb91b0241f45a8da11c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 26 May 2007 17:26:58 +0000 Subject: [PATCH] Make logic clearer, with help from Lars. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18523 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetInclude.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 02810cb2c3..e8eb7adefe 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -462,12 +462,12 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os, LYXERR(Debug::LATEX) << "exportfile:" << exportfile << endl; LYXERR(Debug::LATEX) << "writefile:" << writefile << endl; - if (runparams.inComment || runparams.dryrun) - // Don't try to load or copy the file - ; - //if it's a LyX file and we're including or inputting it... - else if (isInputOrInclude(params_) && + if (runparams.inComment || runparams.dryrun) { + //Don't try to load or copy the file if we're + //in a comment or doing a dryrun + } else if (isInputOrInclude(params_) && isLyXFilename(included_file.absFilename())) { + //if it's a LyX file and we're inputting or including, //try to load it so we can write the associated latex if (!loadIfNeeded(buffer, params_)) return false; @@ -503,9 +503,10 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os, runparams, false); runparams.encoding = oldEnc; } else { - // Copy the file to the temp dir, so that .aux files etc. - // are not created in the original dir. Files included by - // this file will be found via input@path, see ../Buffer.cpp. + // In this case, it's not a LyX file, so we copy the file + // to the temp dir, so that .aux files etc. are not created + // in the original dir. Files included by this file will be + // found via input@path, see ../Buffer.cpp. unsigned long const checksum_in = sum(included_file); unsigned long const checksum_out = sum(writefile); -- 2.39.2