Prevent an unnecessary config file write.
authorCarl Hetherington <cth@carlh.net>
Fri, 6 Jul 2018 21:31:37 +0000 (22:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 6 Jul 2018 21:31:37 +0000 (22:31 +0100)
src/lib/config.cc

index 8f1dd86..56ab16d 100644 (file)
@@ -976,6 +976,10 @@ Config::read_cinemas (cxml::Document const & f)
 void
 Config::set_cinemas_file (boost::filesystem::path file)
 {
+       if (file == _cinemas_file) {
+               return;
+       }
+
        _cinemas_file = file;
 
        if (boost::filesystem::exists (_cinemas_file)) {