From bb910a28a7178217f9a42ae805dbffacb7e97c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Mon, 22 Jul 2019 21:30:01 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@830 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/io_devices/pibinarylog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_main/io_devices/pibinarylog.cpp b/src_main/io_devices/pibinarylog.cpp index 40960605..184a070b 100644 --- a/src_main/io_devices/pibinarylog.cpp +++ b/src_main/io_devices/pibinarylog.cpp @@ -142,8 +142,9 @@ bool PIBinaryLog::closeDevice() { is_indexed = false; index.clear(); index_pos.clear(); + bool e = isEmpty(); log_size = 0; - if (canWrite() && isEmpty()) { + if (canWrite() && e) { file.remove(); return true; }