]> git.mxchange.org Git - simgear.git/commitdiff
More logging for directory deletion failures.
authorJames Turner <zakalawe@mac.com>
Thu, 12 Mar 2015 14:27:48 +0000 (14:27 +0000)
committerJames Turner <zakalawe@mac.com>
Sun, 15 Mar 2015 20:55:54 +0000 (21:55 +0100)
simgear/io/SVNDirectory.cxx
simgear/misc/sg_dir.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);
index 5ffc10d67c29aa500e8f28d2552ee8550259bac9..68916f048d4da0822396b994406c8fa41c833e15 100644 (file)
@@ -382,6 +382,7 @@ bool Dir::remove(bool recursive)
     
     if (recursive) {
         if (!removeChildren()) {
+            SG_LOG(SG_IO, SG_WARN, "Dir at:" << _path << " failed to remove children");
             return false;
         }
     } // of recursive deletion