aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/input/File.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input/File.cpp b/src/input/File.cpp
index a4ef365..d9fe02a 100644
--- a/src/input/File.cpp
+++ b/src/input/File.cpp
@@ -140,6 +140,7 @@ ssize_t FileBase::load_entire_file()
{
// Clear the buffer if the file open fails, this allows user to stop transmission
// of the current data.
+ vector<uint8_t> old_file_contents = move(m_file_contents);
m_file_contents.clear();
m_file_contents_offset = 0;
@@ -179,7 +180,7 @@ ssize_t FileBase::load_entire_file()
} while (r > 0);
close();
- if (m_file_open_alert_shown) {
+ if (old_file_contents != m_file_contents) {
etiLog.level(info) << "Loaded " << m_file_contents.size() << " bytes from " << m_filename;
}
m_file_open_alert_shown = false;