You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Checkpointing a possible insanity-fix to Ownership.
This commit is contained in:
@ -75,7 +75,7 @@ bf::path Ownership::get(const bf::path &p)
|
|||||||
{
|
{
|
||||||
bf::path ret, prefix, normalizedPath(p);
|
bf::path ret, prefix, normalizedPath(p);
|
||||||
bf::path::const_iterator pit;
|
bf::path::const_iterator pit;
|
||||||
uint i;
|
uint i, levels;
|
||||||
|
|
||||||
normalizedPath.normalize();
|
normalizedPath.normalize();
|
||||||
//cerr << "Ownership::get() param = " << p.string() << endl;
|
//cerr << "Ownership::get() param = " << p.string() << endl;
|
||||||
@ -86,13 +86,15 @@ bf::path Ownership::get(const bf::path &p)
|
|||||||
if (pit != normalizedPath.end())
|
if (pit != normalizedPath.end())
|
||||||
prefix = *pit;
|
prefix = *pit;
|
||||||
//cerr << "prefix is " << prefix.string() << endl;
|
//cerr << "prefix is " << prefix.string() << endl;
|
||||||
for (; pit != normalizedPath.end(); ++pit)
|
for (levels = 0; pit != normalizedPath.end(); ++levels, ++pit)
|
||||||
ret /= *pit;
|
ret /= *pit;
|
||||||
if (ret.empty())
|
if (ret.empty())
|
||||||
{
|
{
|
||||||
//cerr << "returning ''" << endl;
|
//cerr << "returning ''" << endl;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
else if (levels == 1)
|
||||||
|
throw runtime_error("Ownership: given path " + p.string() + " does not have minimum number of directories");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user