More logging for directory deletion failures.

This commit is contained in:
James Turner 2015-03-12 14:27:48 +00:00
parent 596591bb64
commit 9d1354f6bd
2 changed files with 12 additions and 5 deletions

View 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);

View 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