Author: rgheck
Date: Thu Nov 17 18:29:38 2011
New Revision: 40202
URL: http://www.lyx.org/trac/changeset/40202

Log:
Simplify code slightly.

Modified:
   lyx-devel/trunk/src/Buffer.cpp

Modified: lyx-devel/trunk/src/Buffer.cpp
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp      Thu Nov 17 18:24:11 2011        (r40201)
+++ lyx-devel/trunk/src/Buffer.cpp      Thu Nov 17 18:29:38 2011        (r40202)
@@ -417,14 +417,14 @@
        d->children_positions.clear();
        d->position_to_children.clear();
 
-       if (!d->cloned_buffer_ && !d->temppath.destroyDirectory()) {
-               Alert::warning(_("Could not remove temporary directory"),
-                       bformat(_("Could not remove the temporary directory 
%1$s"),
-                       from_utf8(d->temppath.absFileName())));
-       }
-
-       if (!isClone())
+       if (!isClone()) {
+               if (!d->temppath.destroyDirectory()) {
+                       Alert::warning(_("Could not remove temporary 
directory"),
+                               bformat(_("Could not remove the temporary 
directory %1$s"),
+                               from_utf8(d->temppath.absFileName())));
+               }
                removePreviews();
+       }
 
        delete d;
 }

Reply via email to