Cleanup unused functions from icinga-installer

fixes #12452
This commit is contained in:
Rune Darrud 2016-08-16 14:07:52 +02:00
parent 81974adf65
commit ae38f160de
1 changed files with 0 additions and 25 deletions

View File

@ -96,14 +96,6 @@ static bool PathExists(const std::string& path)
return (_stat(path.c_str(), &statbuf) >= 0); 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) static std::string GetIcingaDataPath(void)
{ {
char path[MAX_PATH]; 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) static std::string GetNSISInstallPath(void)
{ {
HKEY hKey; HKEY hKey;
@ -164,11 +144,6 @@ static std::string GetNSISInstallPath(void)
return ""; return "";
} }
static void CollectPaths(std::vector<std::string>& paths, const std::string& path)
{
paths.push_back(path);
}
static bool CopyDirectory(const std::string& source, const std::string& destination) static bool CopyDirectory(const std::string& source, const std::string& destination)
{ {
// SHFileOperation requires file names to be terminated with two \0s // SHFileOperation requires file names to be terminated with two \0s