]> git.lyx.org Git - features.git/commitdiff
- Fix crash on closing a document where for instance the PDF is still open (temp...
authorAsger Ottar Alstrup <alstrup@lyx.org>
Fri, 20 Oct 2006 08:42:16 +0000 (08:42 +0000)
committerAsger Ottar Alstrup <alstrup@lyx.org>
Fri, 20 Oct 2006 08:42:16 +0000 (08:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15391 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/filetools.C

index 5259f4090c047c5a1a2fc5d5d96d3e5e6eefc58f..c2d5453aef8b5463eee9c1dcf48a33fbf28d8c98 100644 (file)
@@ -390,7 +390,12 @@ string const createTmpDir(string const & tempdir, string const & mask)
 
 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;
+       }
 }