From a131a418743365cdf97ab0b801c8f4317781e28b Mon Sep 17 00:00:00 2001 From: brian218 <17809637+brian218@users.noreply.github.com> Date: Tue, 6 Jun 2023 01:40:29 +0800 Subject: [PATCH] Fixed a bug in fs::get_parent_dir() --- Utilities/File.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index f128bb10cd..1d982b28cf 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -393,7 +393,7 @@ std::string fs::get_parent_dir(std::string_view path, u32 parent_level) std::replace(normalized_path.begin(), normalized_path.end(), '\\', '/'); #endif - if (normalized_path.back() == '/') + if (normalized_path.ends_with('/')) normalized_path.pop_back(); while (parent_level--)