mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix CAS input on windows (bug 10262)
This is the well known file locking problem: The TempFile class keeps the created file locked for the own process, and this prevents the CAS to read it.
This commit is contained in:
parent
3c56e7c0eb
commit
6dfc255088
@ -1001,8 +1001,13 @@ namespace {
|
||||
{
|
||||
// In order to avoid parsing problems with command interpreters
|
||||
// we pass input data through a file
|
||||
TempFile tempfile("casinput");
|
||||
FileName const cas_tmpfile = tempfile.name();
|
||||
// Since the CAS is supposed to read the temp file we need
|
||||
// to unlock it on windows (bug 10262).
|
||||
unique_ptr<TempFile> tempfile(new TempFile("casinput"));
|
||||
tempfile->setAutoRemove(false);
|
||||
FileName const cas_tmpfile = tempfile->name();
|
||||
tempfile.reset();
|
||||
|
||||
if (cas_tmpfile.empty()) {
|
||||
lyxerr << "Warning: cannot create temporary file."
|
||||
<< endl;
|
||||
|
Loading…
Reference in New Issue
Block a user