-
- if (!real_outfile.empty()) {
- Mover const & mover = getMover(conv.to);
- if (!mover.rename(outfile, real_outfile))
- res = -1;
- else
- LYXERR(Debug::FILES)
- << "renaming file " << outfile
- << " to " << real_outfile
- << endl;
- // Finally, don't forget to tell any future
- // converters to use the renamed file...
- outfile = real_outfile;
- }
-
- if (!conv.parselog.empty()) {
- string const logfile = infile2 + ".log";
- string const script = libScriptSearch(conv.parselog);
- string const command2 = script +
- " < " + quoteName(infile2 + ".out") +
- " > " + quoteName(logfile);
- one.startscript(Systemcall::Wait,
- to_filesystem8bit(from_utf8(command2)));
- if (!scanLog(*buffer, command, makeAbsPath(logfile, path), errorList))
- return false;
+ // We're not waiting for the result, so we can't do anything
+ // else here.
+ } else {
+ res = one.startscript(Systemcall::Wait,
+ to_filesystem8bit(from_utf8(command)));
+ if (!real_outfile.empty()) {
+ Mover const & mover = getMover(conv.to);
+ if (!mover.rename(outfile, real_outfile))
+ res = -1;
+ else
+ LYXERR(Debug::FILES, "renaming file " << outfile
+ << " to " << real_outfile);
+ // Finally, don't forget to tell any future
+ // converters to use the renamed file...
+ outfile = real_outfile;
+ }
+
+ if (!conv.parselog.empty()) {
+ string const logfile = infile2 + ".log";
+ string const script = libScriptSearch(conv.parselog);
+ string const command2 = script +
+ " < " + quoteName(infile2 + ".out") +
+ " > " + quoteName(logfile);
+ one.startscript(Systemcall::Wait,
+ to_filesystem8bit(from_utf8(command2)));
+ if (!scanLog(*buffer, command, makeAbsPath(logfile, path), errorList))
+ return false;
+ }