Lars Gullik Bjønnes wrote:
> [EMAIL PROTECTED] writes:
>
> | Author: rgheck
> | Date: Fri May 25 00:17:04 2007
> | New Revision: 18500
> | 
> | URL: http://www.lyx.org/trac/changeset/18500
> | Log:
> | Forgot to restore this before committing 18494. This fixes bug 3725.
> | 
> | Modified:
> |     lyx-devel/trunk/src/insets/InsetInclude.cpp
> | 
> | Modified: lyx-devel/trunk/src/insets/InsetInclude.cpp
> | URL: 
> http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetInclude.cpp?rev=18500
> | 
> ==============================================================================
> | --- lyx-devel/trunk/src/insets/InsetInclude.cpp (original)
> | +++ lyx-devel/trunk/src/insets/InsetInclude.cpp Fri May 25 00:17:04 2007
> | @@ -463,7 +463,7 @@
> |  
> |     if (runparams.inComment || runparams.dryrun)
> |             // Don't try to load or copy the file
> | -           return true;
> | +           ;
>
> What did this fix again?
>
> Looks a bit bogus to me.
>   
Yes, it does look suspicious. That's why I'd changed it to "return true"
when trying to fix some other bugs.  But it was originally a no-op, and
that turns out to be right, though the logic is very unclear. It's
clearer as in the attached patch, which I can commit with your
permission. Note that I haven't fixed the whitespace in the patch, as
that makes it impossible to see what's going on.

Richard



-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Index: src/insets/InsetInclude.cpp
===================================================================
--- src/insets/InsetInclude.cpp	(revision 18504)
+++ src/insets/InsetInclude.cpp	(working copy)
@@ -461,12 +461,12 @@
 	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_) && 
-	         isLyXFilename(included_file.absFilename())) {
+	//Don't try to copy or load the file if we're in a comment or
+	//doing a dryrun.
+	if (!runparams.inComment && !runparams.dryrun) {
+	//Need to load LyX files we're including or inputing
+	if (isInputOrInclude(params_) && 
+					isLyXFilename(included_file.absFilename())) {
 		//try to load it so we can write the associated latex
 		if (!loadIfNeeded(buffer, params_))
 			return false;
@@ -520,6 +520,7 @@
 			}
 		}
 	}
+	}
 
 	string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
 			"latex" : "pdflatex";

Reply via email to