From 78e7051f246ad0d2eb23c7948654446cc8549d7b Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 23 Jul 2018 13:37:08 +0200 Subject: [PATCH] Added error check in Source::BaseView::monitor_file --- src/source_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/source_base.cc b/src/source_base.cc index 6f5cd8f..812e874 100644 --- a/src/source_base.cc +++ b/src/source_base.cc @@ -196,7 +196,7 @@ void Source::BaseView::monitor_file() { view->delayed_monitor_changed_connection = Glib::signal_timeout().connect([view, previous_last_write_time]() { boost::system::error_code ec; auto last_write_time = boost::filesystem::last_write_time(view->file_path, ec); - if(last_write_time != view->last_write_time) { + if(!ec && last_write_time != view->last_write_time) { if(last_write_time == previous_last_write_time) // If no change has happened in the last second (std::time_t is in seconds) view->check_last_write_time(last_write_time); else {