]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.C
hopefully fix tex2lyx linking.
[lyx.git] / 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;
+       }
 }