mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
81974adf65
commit
ae38f160de
@ -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<std::string>& 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user