@@ -148,7 +148,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
148
148
// store the original directory
149
149
if (!d.exists ())
150
150
{
151
- term (" Output dir %s does not exist!\n " ,path);
151
+ term (" Output directory '%s' does not exist!\n " ,path);
152
152
}
153
153
QCString oldDir = QDir::currentDirPath ().utf8 ();
154
154
QCString macroFile = Config_getString (FORMULA_MACROFILE);
@@ -167,7 +167,6 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
167
167
QCString texName=" _formulas.tex" ;
168
168
IntVector formulasToGenerate;
169
169
QFile f (texName);
170
- bool formulaError=FALSE ;
171
170
if (f.open (IO_WriteOnly))
172
171
{
173
172
FTextStream t (&f);
@@ -214,8 +213,9 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
214
213
{
215
214
err (" Problems running latex. Check your installation or look "
216
215
" for typos in _formulas.tex and check _formulas.log!\n " );
217
- formulaError=TRUE ;
218
- // return;
216
+ Portable::sysTimerStop ();
217
+ QDir::setCurrent (oldDir);
218
+ return ;
219
219
}
220
220
Portable::sysTimerStop ();
221
221
// printf("Running dvips...\n");
@@ -439,12 +439,12 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
439
439
if (RM_TMP_FILES)
440
440
{
441
441
thisDir.remove (" _formulas.dvi" );
442
- if (!formulaError) thisDir.remove (" _formulas.log" ); // keep file in case of errors
442
+ thisDir.remove (" _formulas.log" ); // keep file in case of errors
443
443
thisDir.remove (" _formulas.aux" );
444
444
}
445
445
}
446
446
// remove the latex file itself
447
- if (RM_TMP_FILES && !formulaError ) thisDir.remove (" _formulas.tex" );
447
+ if (RM_TMP_FILES) thisDir.remove (" _formulas.tex" );
448
448
449
449
// write/update the formula repository so we know what text the
450
450
// generated images represent (we use this next time to avoid regeneration
0 commit comments