mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Workaround for boost::filesystem and Visual Studio on Windows
This commit is contained in:
parent
6cce9c0fdd
commit
6c9c65323e
@ -840,7 +840,7 @@ echo "dbe0bef8-c72c-4cc9-9779-da7c4527c5b2" > active-stage
|
||||
like this. Note: This is deep down in the code, use with care!
|
||||
|
||||
```
|
||||
sed -i 's/ActiveStages\["_api"\].*/ActiveStages\["_api"\] = "dbe0bef8-c72c-4cc9-9779-da7c4527c5b2"/g' /var/lib/icinga2/api/packages/_api/active.conf
|
||||
sed -i 's/ActiveStages\["_api"\] = .*/ActiveStages\["_api"\] = "dbe0bef8-c72c-4cc9-9779-da7c4527c5b2"/g' /var/lib/icinga2/api/packages/_api/active.conf
|
||||
```
|
||||
|
||||
Restart Icinga 2.
|
||||
|
@ -44,9 +44,12 @@ void ConfigObjectUtility::RepairPackage(const String& package)
|
||||
/* Try to fix the active stage, whenever we find a directory in there.
|
||||
* This automatically heals packages < 2.11 which remained broken.
|
||||
*/
|
||||
String dir = ConfigPackageUtility::GetPackageDir() + "/" + package + "/";
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
fs::path path(ConfigPackageUtility::GetPackageDir() + "/" + package + "/");
|
||||
/* Use iterators to workaround VS builds on Windows. */
|
||||
fs::path path(dir.Begin(), dir.End());
|
||||
|
||||
fs::recursive_directory_iterator end;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user