// approximately atomic delete + rename operation
SGPath cacheName(localPath);
cacheName.append(DAV_CACHE_NAME);
- if (cacheName.exists()) {
- cacheName.remove();
- }
p.rename(cacheName);
}
{
DAVResource* child = dav->childWithName(nm);
if (!child) {
-// std::cerr << "ZZZ: deleteChildByName: unknown:" << nm << std::endl;
return;
}
SGPath path = fsDir().file(nm);
- dav->removeChild(child);
- delete child;
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);
+ delete child;
+
writeCache();
}
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;
}