[studio] Fix isParentOf check in Project to ensure child dir path ends with /
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
Gary Talent 2025-01-28 01:04:17 -06:00
parent 56b9cb6ebf
commit e22b658a67

View File

@ -48,7 +48,10 @@ static ox::Result<ox::Vector<ox::String>> listAllRecursive(ox::FileSystem &fs, o
[[nodiscard]]
static constexpr bool isParentOf(ox::StringViewCR parent, ox::StringViewCR child) noexcept {
return beginsWith(child, parent);
if (endsWith(child, "/")) {
return beginsWith(child, parent);
}
return beginsWith(sfmt("{}/", child), parent);
}
Project::Project(keel::Context &ctx, ox::String path, ox::StringViewCR projectDataDir):