diff --git a/lib/remote/apilistener-filesync.cpp b/lib/remote/apilistener-filesync.cpp index 79efefe37..4b31673f6 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -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);