]> 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 923993ac4b1df6c6ab23052d1fbeac1e9f5797a5..5cce0c61e2405f8029b3f511b72bf4e562f606dd 100644 (file)
@@ -177,9 +177,6 @@ void SVNDirectory::writeCache()
 // approximately atomic delete + rename operation
     SGPath cacheName(localPath);
     cacheName.append(DAV_CACHE_NAME);
-    if (cacheName.exists()) {
-        cacheName.remove();
-    }
     p.rename(cacheName);
 }
 
@@ -242,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;
     }
 
@@ -250,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);
@@ -322,7 +325,6 @@ void SVNDirectory::mergeUpdateReportDetails(unsigned int depth,
     
     Dir d(localPath);
     if (depth >= MAX_UPDATE_REPORT_DEPTH) {
-        SG_LOG(SG_IO, SG_INFO, localPath << "exceeded MAX_UPDATE_REPORT_DEPTH, cleaning");
         d.removeChildren();
         return;
     }