From 3e4d98219d4e71ff2bf1ab093e31ffe355204b4e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 13 Apr 2023 15:00:06 +0300 Subject: minor compatibility fix --- src/mir_app/src/db_events.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp index fefc83ba02..c3135bfa76 100644 --- a/src/mir_app/src/db_events.cpp +++ b/src/mir_app/src/db_events.cpp @@ -308,6 +308,14 @@ DB::FILE_BLOB::FILE_BLOB(const DB::EventInfo &dbei) DB::FILE_BLOB::~FILE_BLOB() {} +bool DB::FILE_BLOB::isCompleted() const +{ + if (m_iFileSize == -1) + return true; + + return m_iFileSize != 0 && m_iFileSize == m_iTransferred; +} + void DB::FILE_BLOB::write(DB::EventInfo &dbei) { JSONNode root; -- cgit v1.2.3