From: Richard Heck Date: Thu, 17 Nov 2011 17:29:38 +0000 (+0000) Subject: Simplify code slightly. X-Git-Tag: 2.1.0beta1~2361 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=de3148c7c35cc040c050bc8f108c09c6b41ee6b3;p=features.git Simplify code slightly. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40202 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index aa6d936aec..b79101de02 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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; }