Jean-Marc Lasgouttes wrote:
rgheck <[email protected]> writes:
JMarc, do you have any thoughts about this? As I said earlier, I'd
rather do the comparison a different way, but....

I have to admit that I have not followed this thread and that I cannot
extract its "substantifique mmoëlle" ("its essence" looks so plain...).

Care to explain?

Sergiu's patch basically just makes sure the export is going to try to overwrite the original file. The question was just how to do that test. His current suggestion is to do this:

        if (makeAbsPath(file, masterBuffer->filePath()) != 
params.filename.absFilename())
                exportdata.addExternalFile(rit->first, source, file);

which presumably works, but I was earlier expressing a desire to do this test 
using
the DocFileName class's own comparison, so that if we ever improved that, we'd 
get
the benefit here. E.g.:

        dfile = DocFileName(file);
        if (dfile == params.filename)
                exportdata.addExternalFile(rit->first, source, file);

Unfortunately, this does not work, because the operator== also compares the 
save_abs_path_ members. That could be worked around. Maybe another idea is:

        dfile = FileName(file);
        sfile = static_cast<FileName> params.filename;
        if (dfile == sfile) ...

My question to you was really just whether it's worth bothering with this, or 
if the comparison Sergiu uses is good enough.

Richard


Reply via email to