summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-02-15 03:12:24 +0100
committerGitHub <noreply@github.com>2023-02-15 03:12:24 +0100
commit089eab96d721dc65e60090f545d41dd6bd5925e9 (patch)
tree2cd69b3477e05c553cf02b1c101786afa3dc203a /Source/Core/Common/FileUtil.cpp
parent661b74f4a3d9fee4acf80b4e399a6c45e1f21fa3 (diff)
parentc36994a90d2ac9fe15360e1d2e8764aba784c4e8 (diff)
Merge pull request #11567 from AdmiralCurtiss/create-full-path-behavior-change
Common/FileUtil: Revert behavior of CreateFullPath().
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 3944005d6c..f1e0517644 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -209,13 +209,12 @@ bool CreateDir(const std::string& path)
return success;
}
-// Creates the full path of fullPath returns true on success
-bool CreateFullPath(const std::string& fullPath)
+bool CreateFullPath(std::string_view fullPath)
{
DEBUG_LOG_FMT(COMMON, "{}: path {}", __func__, fullPath);
std::error_code error;
- auto native_path = StringToPath(fullPath);
+ auto native_path = StringToPath(fullPath).parent_path();
bool success = fs::create_directories(native_path, error);
// If the path was not created, check if it was a pre-existing directory
if (!success && fs::is_directory(native_path))