From 3fc38405de2531f6f2ef046c6174c69d5c596691 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Sat, 4 May 2024 19:04:33 +0200 Subject: [PATCH] Fix crash in FileSystem --- source/FileSystem.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/FileSystem.cpp b/source/FileSystem.cpp index 96b70fc..d491609 100644 --- a/source/FileSystem.cpp +++ b/source/FileSystem.cpp @@ -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; }