Attached fixes "No log file" bug when tmpdir option is off. thanks john -- "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald Knuth
? latexlog.1.1.6.diff Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.757.2.33 diff -u -p -r1.757.2.33 ChangeLog --- ChangeLog 2001/02/06 16:17:47 1.757.2.33 +++ ChangeLog 2001/02/07 14:55:25 @@ -1,3 +1,8 @@ +2001-02-07 John Levon <[EMAIL PROTECTED]> + + * LaTeXLog.C: fix reading of latex log file when + tmpdir option is off + 2001-02-06 albert chin <[EMAIL PROTECTED]> * acconfig.h: Index: po/POTFILES.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/POTFILES.in,v retrieving revision 1.118.2.2 diff -u -p -r1.118.2.2 POTFILES.in --- po/POTFILES.in 2001/01/31 16:44:35 1.118.2.2 +++ po/POTFILES.in 2001/02/07 14:55:25 @@ -53,35 +53,35 @@ src/frontends/kde/refdlg.C src/frontends/kde/tocdlg.C src/frontends/kde/urldlg.C src/frontends/xforms/FormBase.h -src/frontends/xforms/form_citation.C src/frontends/xforms/FormCitation.C -src/frontends/xforms/form_copyright.C +src/frontends/xforms/form_citation.C src/frontends/xforms/FormCopyright.C -src/frontends/xforms/form_document.C +src/frontends/xforms/form_copyright.C src/frontends/xforms/FormDocument.C -src/frontends/xforms/form_error.C +src/frontends/xforms/form_document.C src/frontends/xforms/FormError.C -src/frontends/xforms/form_graphics.C +src/frontends/xforms/form_error.C src/frontends/xforms/FormGraphics.C -src/frontends/xforms/form_index.C +src/frontends/xforms/form_graphics.C src/frontends/xforms/FormIndex.C +src/frontends/xforms/form_index.C src/frontends/xforms/FormInset.h -src/frontends/xforms/form_paragraph.C src/frontends/xforms/FormParagraph.C -src/frontends/xforms/form_preferences.C +src/frontends/xforms/form_paragraph.C src/frontends/xforms/FormPreferences.C -src/frontends/xforms/form_print.C +src/frontends/xforms/form_preferences.C src/frontends/xforms/FormPrint.C -src/frontends/xforms/form_ref.C +src/frontends/xforms/form_print.C src/frontends/xforms/FormRef.C -src/frontends/xforms/form_tabular.C +src/frontends/xforms/form_ref.C src/frontends/xforms/FormTabular.C -src/frontends/xforms/form_tabular_create.C +src/frontends/xforms/form_tabular.C src/frontends/xforms/FormTabularCreate.C -src/frontends/xforms/form_toc.C +src/frontends/xforms/form_tabular_create.C src/frontends/xforms/FormToc.C -src/frontends/xforms/form_url.C +src/frontends/xforms/form_toc.C src/frontends/xforms/FormUrl.C +src/frontends/xforms/form_url.C src/frontends/xforms/input_validators.C src/frontends/xforms/Menubar_pimpl.C src/frontends/xforms/xform_helpers.C Index: src/LaTeXLog.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/Attic/LaTeXLog.C,v retrieving revision 1.14 diff -u -p -r1.14 LaTeXLog.C --- src/LaTeXLog.C 2000/11/28 06:46:05 1.14 +++ src/LaTeXLog.C 2001/02/07 14:55:25 @@ -23,23 +23,33 @@ void ShowLatexLog() bool use_build = false; static int ow = -1, oh; - filename = current_view->buffer()->getLatexName(); + filename = current_view->buffer()->getLatexName(false); + if (!filename.empty()) { fname = OnlyFilename(ChangeExtension(filename, ".log")); bname = OnlyFilename(ChangeExtension(filename, formats.Extension("literate") + ".out")); path = OnlyPath(filename); if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) { - path = current_view->buffer()->tmppath; + path = current_view->buffer()->tmppath + "/"; } FileInfo f_fi(path + fname), b_fi(path + bname); + if (b_fi.exist()) if (!f_fi.exist() || f_fi.getModificationTime() < b_fi.getModificationTime()) use_build = true; // If no Latex log or Build log is newer, show Build log - Path p(path); // path to LaTeX file - if (!fl_load_browser(fd_latex_log->browser_latexlog, - use_build ? bname.c_str() : fname.c_str())) + + string name; + + if (use_build) + name = path + bname; + else + name = path + fname; + + lyxerr[Debug::FILES] << "Log file: " << name << endl; + + if (!fl_load_browser(fd_latex_log->browser_latexlog, name.c_str())) fl_add_browser_line(fd_latex_log->browser_latexlog, _("No LaTeX log file found")); } else {