]> granicus.if.org Git - icinga2/commitdiff
Fix authoritative zones in config sync
authorMichael Friedrich <michael.friedrich@gmail.com>
Sat, 7 Feb 2015 22:41:43 +0000 (23:41 +0100)
committerMichael Friedrich <michael.friedrich@gmail.com>
Sat, 7 Feb 2015 22:41:43 +0000 (23:41 +0100)
fixes #8388
refs #8256

lib/remote/apilistener-sync.cpp

index b36d7cc5ce9f7bc78d27f8c5005d5b69b20cd6de..51120462be29c181431781a86707cb96a2d27018 100644 (file)
@@ -105,8 +105,8 @@ bool ApiListener::UpdateConfigDir(const Dictionary::Ptr& oldConfig, const Dictio
 
        if (authoritative) {
                String authPath = configDir + "/.authoritative";
-               if (!Utility::PathExists(tsPath)) {
-                       std::ofstream fp(tsPath.CStr(), std::ofstream::out | std::ostream::trunc);
+               if (!Utility::PathExists(authPath)) {
+                       std::ofstream fp(authPath.CStr(), std::ofstream::out | std::ostream::trunc);
                        fp.close();
                }
        }