Sergiu Carpov wrote:
Your solution doesn't work, because "expfile" has save_abs_path_ true
and in "params.filename" this fields is false. For the comparison of
DocFileName this value must be the same.
Hmm, OK, I see the issue.
By the way, what does it means "save_abs_path_" field?
It seems to record whether the filename provided was absolute or not.
This tells us whether we should reference the file via an absolute or
relative path (e.g., when producing LaTeX, or saving the LyX file).
And also a minor difference is that in my example it was not-equal sign.
Right!
I propose the next patch:
Unfortunately, this one can't be guaranteed to work, either, since
save_abs_path_ could be true. So it looks as if maybe your original
patch was best, though I'd still rather do such comparisons in a central
locale.
Anyway, the original patch was this:
Index: src/insets/ExternalSupport.cpp
===================================================================
--- src/insets/ExternalSupport.cpp (revision 30336)
+++ src/insets/ExternalSupport.cpp (working copy)
@@ -296,7 +296,8 @@
ALL_BUT_PATHS);
// if file is a relative name, it is interpreted
// relative to the master document.
- exportdata.addExternalFile(rit->first, source,
file);
+ if (file != params.filename.absFilename())
+ exportdata.addExternalFile(rit->first,
source, file);
}
}
}
JMarc, do you have any thoughts about this? As I said earlier, I'd rather
do the comparison a different way, but....
Richard