On Fri, Dec 14, 2007 at 04:17:49PM +0100, Abdelrazak Younes wrote:

> Jean-Marc Lasgouttes wrote:
> > I am trying to see why the UserGuide makes errors when typesetting. I
> > already fixed a crash, but it is still not working as I would want.
> > Anyway, is there a reason why I see on the console the messages below?
> > It makes debug messages basically useless.
> 
> Hum, probably my fault. The original copy() used to overwrite by 
> default. There is an "overwrite" option to copyTo(), I guess we should 
> pass it true when moving files from the Cache. I'll do that.

There's another problem with the new FileName::renameTo() method.
The old rename() method was basically equivalent to move:

bool rename(FileName const & from, FileName const & to)
{
        if (::rename(from.toFilesystemEncoding().c_str(),
                        to.toFilesystemEncoding().c_str()) != -1) 
                return true;
        if (!copy(from, to))
                return false;
        from.removeFile();
        return true;
}

while the new renameTo() is not. As a consequence, the clean_dvi.py
script fails to overwrite the "draft" dvi file produced by latex
with the cleaned up version, because it tries to rename the .out file
it creates as the existing .dvi file (which QFile::rename cannot do).

-- 
Enrico

Reply via email to