]> granicus.if.org Git - icinga2/commitdiff
Remove the Icinga 2 directory (if it's empty) after running uninstall.exe
authorGunnar Beutner <gunnar@beutner.name>
Thu, 14 Apr 2016 12:24:41 +0000 (14:24 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Apr 2016 08:09:37 +0000 (10:09 +0200)
refs #11449

icinga-installer/icinga-installer.cpp

index 99abb5ed4dc9aa94035d867a797b2f59acfa4be2..d301af592d0fb5da349fc10538a03edc27df07fe 100644 (file)
@@ -181,18 +181,6 @@ static bool MoveDirectory(const std::string& source, const std::string& destinat
                fop.fFlags = FOF_NO_UI;
                if (SHFileOperation(&fop) != 0)
                        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;
@@ -229,6 +217,8 @@ static int UpgradeNSIS(void)
                std::string newNameVar = dataPath + "\\var";
                if (!MoveDirectory(oldNameVar, newNameVar))
                        return 1;
+
+               _unlink(installPath.c_str());
        }       
 
        return 0;