summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index f2d0132b48..ce95aec7e6 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -808,13 +808,20 @@ ARDOUR_UI::check_announcements ()
_annc_filename.append (VERSIONSTRING);
std::string path = Glib::build_filename (user_config_directory(), _annc_filename);
- std::ifstream announce_file (path.c_str());
- if ( announce_file.fail() )
- _announce_string = "";
- else {
- std::stringstream oss;
- oss << announce_file.rdbuf();
- _announce_string = oss.str();
+ FILE* fin = g_fopen (path.c_str(), "rb");
+
+ if (fin) {
+ std::ifstream announce_file (fin);
+
+ if ( announce_file.fail() )
+ _announce_string = "";
+ else {
+ std::stringstream oss;
+ oss << announce_file.rdbuf();
+ _announce_string = oss.str();
+ }
+
+ fclose (fin);
}
pingback (VERSIONSTRING, path);