Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:

This is the message I get when I try to compile the Tutorial to dvi:

convert: unable to open image
png:C:/Users/abdel/AppData/Local/Temp//lyx_tmpdir13444a15356/lyx_tmpbuf2/20C__devel_lyx_trunk_lib_images_math_frac.png':
Invalid argument.

I guess the problem comes from the double // after 'Temp' as the
Windows explorer also chokes on this path, unless i remove the second
slash.

It probably comes from all those places where "/" is added to a path without
checking whether it is still there. Suspicious places include:

pegase: grep -r '+ *"/"' src
[...]
src/support/FileName.cpp:               tmpfl = package().temp_dir().absFilename() + 
"/" + mask;
src/support/filetools.cpp:      string const path = file.onlyPath().absFilename() + 
"/";
src/support/filetools.cpp:      string const tmp_dir = tempdir.absFilename() + 
"/" + mask;
Yes, I already fixed the last 3:

URL: http://www.lyx.org/trac/changeset/25442
Log:
Remove double slash in system temporary path.


src/support/os_win32.cpp:               string const cygprefix = cygdrive + "/" 
+ drive.substr(0, 1);

This one is Enrico's domain :-)

src/client/client.cpp:  FileName dirpath(dir + "/");

Client is still not working on Windows anyway.

src/Buffer.cpp: return d->filename.onlyPath().absFilename() + "/";
This one doesn't seem to be erroneous because FileName::onlyPath() seems to be sane.

Abdel.

Reply via email to