]> git.mxchange.org Git - simgear.git/blobdiff - simgear/package/Install.cxx
Catalog install feedback.
[simgear.git] / simgear / package / Install.cxx
index c50e31d958829c334730873e47504e78c0800d7a..2ca011222723c4d87654940c6d00246e90d391ee 100644 (file)
@@ -313,11 +313,21 @@ void Install::startUpdate()
     m_package->catalog()->root()->startInstall(this);
 }
 
-void Install::uninstall()
+bool Install::uninstall()
 {
     Dir d(m_path);
-    d.remove(true);
+    if (!d.remove(true)) {
+        SG_LOG(SG_GENERAL, SG_ALERT, "package uninstall failed: couldn't remove path " << m_path);
+        return false;
+    }
+    
     m_package->catalog()->unregisterInstall(this);
+    return true;
+}
+
+bool Install::isDownloading() const
+{
+    return (m_download != NULL);
 }
 
 //------------------------------------------------------------------------------