[studio] Fix isParentOf check in Project to ensure child dir path ends with /
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
parent
56b9cb6ebf
commit
e22b658a67
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user