Lars Gullik Bjønnes wrote:

> Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> | Sometime ago I put the following message into InsetGraphic::draw
> | 
> |         // MakeAbsPath returns filename_ unchanged if it is absolute
> |         // already.
> |         string const file_with_path =
> |                 MakeAbsPath(params_.filename, bv->buffer()->filePath());
> | 
> |         // A 'paste' operation creates a new inset with the correct
> |         filepath, // but then the 'old' inset stored in the 'copy'
> |         operation is actually // added to the buffer.
> |         // Thus, we should ensure that the filepath is correct.
> |         if (file_with_path != loader_.filename()) {
> |                 params_.filename = file_with_path;
> |                 update(params_);
> |         }
> | 
> | I suspect that John's changes to store the absolute path name internally
> | will have cured the symptoms of this problem, but it would be nice if
> | paste used the correct inset...
> 
> I do not quite get what you are at? Can you elaborate a bit?

Sure. Sometime _last year_ I put this message into the method.

Until John's clone patch, we stored the file internally sometimes with a 
relative path to the buffer and sometimes with an absolute path.

If it were stored with a relative path in subdir/file.eps and I _cut_ it and 
pasted it into a new buffer with a different buffer->filePath(), we failed 
to find the graphics file.

It turned out --- lots of digging --- that we were doing what I describe 
above.

I don't know if this is still the case and suspect that the problem will be 
hidden if it is (because the absolute file path is now stored internally). 
Nonetheless it would appear to be a bug waiting to bite again.

-- 
Angus

Reply via email to