Abdelrazak Younes wrote:
Richard Heck wrote:
Abdelrazak Younes wrote:
Bennett Helm wrote:
The first time I typeset a file, everything works. If I
subsequently modify
the document and then typeset again, I get an error:
Could not copy a temporary file from
/Users/bennett/tmp/lyx_tmpdir.J82124/lyx_tmpbuf3/test.pdf to
/Users/bennett/tmp/lyx_tmpdir.J82124/lyx_tmpbuf3/test.pdf.
The terminal shows:
FileName.cpp(204): FileName::copyTo(): Could not copy file
/Users/bennett/tmp/lyx_tmpdir.J82124/lyx_tmpbuf3/test.pdf to
/Users/bennett/tmp/lyx_tmpdir.J82124/lyx_tmpbuf3/test.pdf
Error: Cannot convert file
Could this be a problem with r25960? (It didn't happen yesterday.)
OK, fixed.
JMarc, when you have a minute, I don't understand my own fix...
What about the attached? This solves the problem Bennett noticed and
should also handle symbolic links, I'd think.
But this is reverting my fix to bug 2771:
http://bugzilla.lyx.org/show_bug.cgi?id=2771
That said, I will put in your fix using symLinkTarget().
Oh, I see. Sorry.
I saw the same problem Bennett did, by the way, on Linux. It occurred to
me that it might be another manifestation of the refresh() issue. So I
did the attached, and it works for me. Bennett?
rh
Index: Converter.cpp
===================================================================
--- Converter.cpp (revision 25983)
+++ Converter.cpp (working copy)
@@ -352,7 +352,7 @@
// if input and output files are equal, we use a
// temporary file as intermediary (JMarc)
FileName real_outfile;
- if (outfile.absFilename() == infile.absFilename()) {
+ if (outfile == infile) {
real_outfile = infile;
// when importing, a buffer does not necessarily exist
if (buffer)
Index: support/FileName.cpp
===================================================================
--- support/FileName.cpp (revision 25983)
+++ support/FileName.cpp (working copy)
@@ -816,6 +816,8 @@
// file.
// * Long and short file names that refer to the same file on Windows
are
// treated as if they referred to different files.
+ lhs.d->refresh();
+ rhs.d->refresh();
return lhs.d->fi == rhs.d->fi;
}