diff --git a/src/Buffer.cpp b/src/Buffer.cpp index aebe0c96cb..d5e337603c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3749,7 +3749,8 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir return ExportTexPathHasSpaces; } else { runparams.nice = false; - bool const success = makeLaTeXFile(FileName(filename), string(), runparams); + bool const success = makeLaTeXFile( + FileName(filename), filePath(), runparams); if (d->cloned_buffer_) d->cloned_buffer_->d->errorLists["Export"] = d->errorLists["Export"]; if (!success)