Fix crash in FileSystem

This commit is contained in:
tobid7 2024-05-04 19:04:33 +02:00
parent 19450ba2c9
commit 3fc38405de

View File

@ -30,10 +30,8 @@ std::string RenderD7::FileSystem::GetParentPath(std::string path,
if (path.substr(path.length() - 1, 1) != "/") {
tcl += "/";
}
std::string res;
if (std::filesystem::exists(
std::filesystem::path(tcl).parent_path().parent_path()))
res = std::filesystem::path(tcl).parent_path().parent_path().string();
std::string res =
std::filesystem::path(tcl).parent_path().parent_path().string();
if (res.length() > mount_point.length()) {
return res;
}