]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/SVNDirectory.cxx
Fix #1783: repeated error message on console
[simgear.git] / simgear / io / SVNDirectory.cxx
index b1b57d531130b6c42da9dfd43adb8af3f0cff225..5cce0c61e2405f8029b3f511b72bf4e562f606dd 100644 (file)
@@ -239,7 +239,6 @@ void SVNDirectory::deleteChildByName(const std::string& nm)
 {
     DAVResource* child = dav->childWithName(nm);
     if (!child) {
-//        std::cerr << "ZZZ: deleteChildByName: unknown:" << nm << std::endl;
         return;
     }
 
@@ -247,17 +246,24 @@ void SVNDirectory::deleteChildByName(const std::string& nm)
     
     if (child->isCollection()) {
         Dir d(path);
-        d.remove(true);
-    
+        bool ok = d.remove(true);
+        if (!ok) {
+            SG_LOG(SG_NETWORK, SG_ALERT, "SVNDirectory::deleteChildByName: failed to remove dir:"
+                   << nm << " at path:\n\t" << path);
+        }
+
         DirectoryList::iterator it = findChildDir(nm);
         if (it != _children.end()) {
             SVNDirectory* c = *it;
-    //        std::cout << "YYY: deleting SVNDirectory for:" << nm << std::endl;
             delete c;
             _children.erase(it);
         }
     } else {
-        path.remove();
+        bool ok = path.remove();
+        if (!ok) {
+            SG_LOG(SG_NETWORK, SG_ALERT, "SVNDirectory::deleteChildByName: failed to remove path:" << nm
+                   << " at path:\n\t" << path);
+        }
     }
 
     dav->removeChild(child);