From: James Turner Date: Thu, 12 Mar 2015 14:27:48 +0000 (+0000) Subject: More logging for directory deletion failures. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9d1354f6bdba4fab1ec9e45147c0d27a28d36212;p=simgear.git More logging for directory deletion failures. --- diff --git a/simgear/io/SVNDirectory.cxx b/simgear/io/SVNDirectory.cxx index b1b57d53..5cce0c61 100644 --- a/simgear/io/SVNDirectory.cxx +++ b/simgear/io/SVNDirectory.cxx @@ -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); diff --git a/simgear/misc/sg_dir.cxx b/simgear/misc/sg_dir.cxx index 5ffc10d6..68916f04 100644 --- a/simgear/misc/sg_dir.cxx +++ b/simgear/misc/sg_dir.cxx @@ -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