- Fix crash on closing a document where for instance the PDF is still open (temp directory can not be removed when another program has an open file there)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15391 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Asger Ottar Alstrup 2006-10-20 08:42:16 +00:00
parent 9e8d9ad176
commit 2a887391ff

View File

@ -390,7 +390,12 @@ string const createTmpDir(string const & tempdir, string const & mask)
bool destroyDir(string const & tmpdir) bool destroyDir(string const & tmpdir)
{ {
return fs::remove_all(tmpdir) > 0; try {
return fs::remove_all(tmpdir) > 0;
} catch (fs::filesystem_error const & fe){
lyxerr << "Could not delete " << tmpdir << ". (" << fe.what() << ")" << std::endl;
return false;
}
} }