Do not delete /tmp.

Somebody should find a real fix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16094 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-11-28 20:04:16 +00:00
parent f17d9a7b86
commit 89721c3b4c

View File

@ -415,6 +415,14 @@ void LyX::prepareExit()
// do any other cleanup procedures now
lyxerr[Debug::INFO] << "Deleting tmp dir " << package().temp_dir() << endl;
// Prevent the deletion of /tmp if LyX was called with invalid
// arguments. Does not work on windows.
// FIXME: Fix the real bug instead.
if (package().temp_dir() == "/tmp") {
lyxerr << "Not deleting /tmp." << endl;
return;
}
if (!destroyDir(package().temp_dir())) {
docstring const msg =
bformat(_("Unable to remove the temporary directory %1$s"),