From ae38f160de3b4e15664fd6a06bddb56056163d30 Mon Sep 17 00:00:00 2001 From: Rune Darrud Date: Tue, 16 Aug 2016 14:07:52 +0200 Subject: [PATCH] Cleanup unused functions from icinga-installer fixes #12452 --- icinga-installer/icinga-installer.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp index 5fb10512e..8ff139b92 100644 --- a/icinga-installer/icinga-installer.cpp +++ b/icinga-installer/icinga-installer.cpp @@ -96,14 +96,6 @@ static bool PathExists(const std::string& path) return (_stat(path.c_str(), &statbuf) >= 0); } -static void CopyFile(const std::string& source, const std::string& target) -{ - std::ifstream ifs(source.c_str(), std::ios::binary); - std::ofstream ofs(target.c_str(), std::ios::binary | std::ios::trunc); - - ofs << ifs.rdbuf(); -} - static std::string GetIcingaDataPath(void) { char path[MAX_PATH]; @@ -132,18 +124,6 @@ static void MkDirP(const std::string& path) } } -static void CopyConfigFile(const std::string& installDir, const std::string& sourceConfigPath, size_t skelPrefixLength) -{ - std::string relativeConfigPath = sourceConfigPath.substr(skelPrefixLength); - - std::string targetConfigPath = installDir + relativeConfigPath; - - if (!PathExists(targetConfigPath)) { - MkDirP(DirName(targetConfigPath)); - CopyFile(sourceConfigPath, targetConfigPath); - } -} - static std::string GetNSISInstallPath(void) { HKEY hKey; @@ -164,11 +144,6 @@ static std::string GetNSISInstallPath(void) return ""; } -static void CollectPaths(std::vector& paths, const std::string& path) -{ - paths.push_back(path); -} - static bool CopyDirectory(const std::string& source, const std::string& destination) { // SHFileOperation requires file names to be terminated with two \0s -- 2.40.0