]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
Scons: handle the case when qt4 is in system directories
[lyx.git] / src / lyx_main.C
index afa834e130a017db98bb302874d4be81cf5bd2f0..980582e90178e5d9882a79d6ede50a6903914980 100644 (file)
@@ -110,9 +110,6 @@ bool use_gui = true;
 
 namespace {
 
-/// Don't try to remove the temporary directory if it has not been created
-bool remove_tmpdir = false;
-
 // Filled with the command line arguments "foo" of "-sysdir foo" or
 // "-userdir foo".
 string cl_system_support;
@@ -422,7 +419,7 @@ void LyX::prepareExit()
        pimpl_->buffer_list_.closeAll();
 
        // do any other cleanup procedures now
-       if (remove_tmpdir) {
+       if (package().temp_dir() != package().system_temp_dir()) {
                lyxerr[Debug::INFO] << "Deleting tmp dir "
                                    << package().temp_dir() << endl;
 
@@ -502,7 +499,6 @@ void LyX::loadFiles()
                if (it->empty())
                        continue;
 
-               Buffer * const b = newFile(it->absFilename(), string(), true);
                Buffer * buf = pimpl_->buffer_list_.newBuffer(it->absFilename(), false);
                if (loadLyXFile(buf, *it)) {
                        ErrorList const & el = buf->errorList("Parse");
@@ -857,7 +853,6 @@ bool LyX::init()
                // trying again but simply exit.
                return false;
        }
-       remove_tmpdir = true;
 
        if (lyxerr.debugging(Debug::INIT)) {
                lyxerr << "LyX tmp dir: `" << package().temp_dir() << '\'' << endl;