>>>>> "R" == R Lahaye <[EMAIL PROTECTED]> writes:

R> Hi,

R> I have attached a tar file that contains an example lyx-file and a
R> graphics file, that hopefully demonstrate the problem.

I think the following patch addresses the issue. Rob, Herbert, could
you please test it and tell me whether it works?

JMarc

Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.386
diff -u -p -r1.386 ChangeLog
--- src/insets/ChangeLog	11 Apr 2002 18:40:59 -0000	1.386
+++ src/insets/ChangeLog	12 Apr 2002 09:04:03 -0000
@@ -1,7 +1,12 @@
+2002-04-12  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* insetgraphics.C (prepareFile): fix bug when graphics is a
+	relative path
+
 2002-04-08  Herbert Voss  <[EMAIL PROTECTED]>
 
-       * insetgraphic.C (write): write the rotating angle as
-       a float as is. test only for != 0.0
+	* insetgraphic.C (write): write the rotating angle as
+	a float as is. test only for != 0.0
 
 2002-04-11  Juergen Vigna  <[EMAIL PROTECTED]>
 
Index: src/insets/insetgraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.103
diff -u -p -r1.103 insetgraphics.C
--- src/insets/insetgraphics.C	8 Apr 2002 17:26:33 -0000	1.103
+++ src/insets/insetgraphics.C	12 Apr 2002 09:04:04 -0000
@@ -635,7 +635,7 @@ string const InsetGraphics::prepareFile(
 		return filename_;
 	}
 
-	string const temp = AddName(buf->tmppath, filename_);
+	string const temp = MakeAbsPath(filename_, buf->tmppath);
 	string const outfile_base = RemoveExtension(temp);
 
 	lyxerr[Debug::GRAPHICS] << "tempname = " << temp << "\n";
@@ -644,7 +644,7 @@ string const InsetGraphics::prepareFile(
 	lyxerr[Debug::GRAPHICS] << "outfile_base = " << outfile_base << endl;
 
 	converters.convert(buf, filename_, outfile_base, from, to);
-	return outfile_base;
+	return RemoveExtension(filename_);
 }
 
 

Reply via email to