Shutdown LyX server and socket before trying to remove the tempdir,

otherwise it would not be empty and could not be removed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21992 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2007-12-06 18:52:17 +00:00
parent 5ae6e67a8b
commit 40dd6a1b08

View File

@ -471,6 +471,15 @@ void LyX::prepareExit()
// close buffers first
pimpl_->buffer_list_.closeAll();
// register session changes and shutdown server and socket
if (use_gui) {
if (pimpl_->session_)
pimpl_->session_->writeFile();
pimpl_->session_.reset();
pimpl_->lyx_server_.reset();
pimpl_->lyx_socket_.reset();
}
// do any other cleanup procedures now
if (package().temp_dir() != package().system_temp_dir()) {
LYXERR(Debug::INFO, "Deleting tmp dir "
@ -484,14 +493,6 @@ void LyX::prepareExit()
}
}
if (use_gui) {
if (pimpl_->session_)
pimpl_->session_->writeFile();
pimpl_->session_.reset();
pimpl_->lyx_server_.reset();
pimpl_->lyx_socket_.reset();
}
// Kill the application object before exiting. This avoids crashes
// when exiting on Linux.
if (pimpl_->application_)