]> git.lyx.org Git - features.git/commitdiff
Simplify code slightly.
authorRichard Heck <rgheck@comcast.net>
Thu, 17 Nov 2011 17:29:38 +0000 (17:29 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 17 Nov 2011 17:29:38 +0000 (17:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40202 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index aa6d936aec8e6fa00b4c92a4e71c386280e21078..b79101de02ce823d71a59cc2ebb2cc83e70c60e9 100644 (file)
@@ -417,14 +417,14 @@ Buffer::~Buffer()
        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;
 }