REVIEW: unique HTTPRepository is encapsulated within HTTPDirectory object.

This commit is contained in:
Scott Giese
2020-08-17 20:02:45 -05:00
parent a8c13cf041
commit 995a176654

View File

@@ -630,6 +630,9 @@ HTTPRepository::HTTPRepository(const SGPath& base, HTTP::Client *cl) :
// _d->rootDir should be changed to a shared_ptr
// this object is passed to several chained methods, so destruction within ~HTTPRepoPrivate may be
// an easier fix assuming sole ownership would apply
// REVIEW: _d is only partially initialized when it is being passed to the HTTPDirectory ctor.
// The HTTPDirectory object is taking ownership of the shared HTTPRepoPrivate object.
// Mismatch between _d being a unique_ptr, yet also cloned into HTTPDirectory.
_d->rootDir = new HTTPDirectory(_d.get(), "");
_d->parseHashCache();
}