ToobAmp: correctlly map default file property for Toob Convolution Reverb.
This commit is contained in:
@@ -118,4 +118,7 @@ namespace pipedal
|
||||
std::string ToLower(const std::string&value);
|
||||
|
||||
std::filesystem::path MakeRelativePath(const std::filesystem::path &path, const std::filesystem::path&parentPath);
|
||||
|
||||
bool IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath);
|
||||
|
||||
}
|
||||
|
||||
@@ -189,3 +189,30 @@ std::filesystem::path pipedal::MakeRelativePath(const std::filesystem::path &pat
|
||||
return remander;
|
||||
|
||||
}
|
||||
|
||||
bool pipedal::IsSubdirectory(const std::filesystem::path &path, const std::filesystem::path &basePath)
|
||||
{
|
||||
auto iPath = path.begin();
|
||||
for (auto i = basePath.begin(); i != basePath.end(); ++i)
|
||||
{
|
||||
if (iPath == path.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((*i) != (*iPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
++iPath;
|
||||
}
|
||||
while (iPath != path.end())
|
||||
{
|
||||
if (iPath->string() == "..")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
++iPath;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user