Ensure directory paths are created from stage -> prod

This commit is contained in:
Michael Friedrich 2018-09-27 18:31:08 +02:00
parent c2d7063ae7
commit 2ed56b50a4
1 changed files with 6 additions and 1 deletions

View File

@ -369,7 +369,12 @@ void ApiListener::TryActivateZonesStageCallback(const ProcessResult& pr,
Log(LogCritical, "ApiListener") Log(LogCritical, "ApiListener")
<< "Copying file '" << path << "' from config sync staging to production directory."; << "Copying file '" << path << "' from config sync staging to production directory.";
Utility::CopyFile(GetApiZonesStageDir() + path, GetApiZonesDir() + path); String stagePath = GetApiZonesStageDir() + path;
String currentPath = GetApiZonesDir() + path;
Utility::MkDirP(Utility::DirName(currentPath), 0755);
Utility::CopyFile(stagePath, currentPath);
} }
if (reload) if (reload)