]> granicus.if.org Git - icinga2/commitdiff
Leave partial deletes as is, this is dealt with stage purge later
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 24 Oct 2018 14:52:35 +0000 (16:52 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 19 Jun 2019 12:46:11 +0000 (14:46 +0200)
lib/remote/apilistener-filesync.cpp

index 79efefe37e74bbf28ee606c67079b7016169d3d9..4b31673f699d44527014fa292d12efda50dfd98e 100644 (file)
@@ -186,10 +186,12 @@ bool ApiListener::UpdateConfigDir(const ConfigDirInformation& oldConfigInfo, con
                        configChange = true;
 
                        String path = configDir + "/" + kv.first;
-                       Utility::RemoveDirRecursive(path);
+                       (void) unlink(path.CStr());
                }
        }
 
+       /* Consider that one of the paths leaves an empty directory here. Such is not copied from stage to prod and purged then automtically. */
+
        String tsPath = configDir + "/.timestamp";
        if (!Utility::PathExists(tsPath)) {
                std::ofstream fp(tsPath.CStr(), std::ofstream::out | std::ostream::trunc);