mirror of https://github.com/Icinga/icinga2.git
Remove the Icinga 2 directory (if it's empty) after running uninstall.exe
refs #11449
This commit is contained in:
parent
83e410a302
commit
3c3ed80967
|
@ -181,18 +181,6 @@ static bool MoveDirectory(const std::string& source, const std::string& destinat
|
||||||
fop.fFlags = FOF_NO_UI;
|
fop.fFlags = FOF_NO_UI;
|
||||||
if (SHFileOperation(&fop) != 0)
|
if (SHFileOperation(&fop) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// XXX: reimplement
|
|
||||||
/*std::vector<std::string> paths;
|
|
||||||
paths.push_back(source);
|
|
||||||
Utility::GlobRecursive(source, "*", boost::bind(&CollectPaths, boost::ref(paths), _1), GlobDirectory);
|
|
||||||
Utility::GlobRecursive(source, "*", boost::bind(&CollectPaths, boost::ref(paths), _1), GlobFile);
|
|
||||||
|
|
||||||
std::reverse(paths.begin(), paths.end());
|
|
||||||
|
|
||||||
BOOST_FOREACH(const std::string& path, paths) {
|
|
||||||
(void)MoveFileEx(path.c_str(), NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -229,6 +217,8 @@ static int UpgradeNSIS(void)
|
||||||
std::string newNameVar = dataPath + "\\var";
|
std::string newNameVar = dataPath + "\\var";
|
||||||
if (!MoveDirectory(oldNameVar, newNameVar))
|
if (!MoveDirectory(oldNameVar, newNameVar))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
_unlink(installPath.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue