summaryrefslogtreecommitdiffstats
path: root/src/common/fs/path_util.h
diff options
context:
space:
mode:
authorBreadFish64 <breadfish64@users.noreply.github.com>2023-12-06 05:17:19 +0100
committerLiam <byteslice@airmail.cc>2023-12-06 05:17:19 +0100
commitd5de9402ee22eea985d6842baafd8922e15d3784 (patch)
treef302a3a87aad12213c36ef00cd28c86e3e27ba61 /src/common/fs/path_util.h
parentMerge pull request #12271 from liamwhite/pretext-fix (diff)
downloadyuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar.gz
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar.bz2
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar.lz
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar.xz
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.tar.zst
yuzu-d5de9402ee22eea985d6842baafd8922e15d3784.zip
Diffstat (limited to '')
-rw-r--r--src/common/fs/path_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h
index 2874ea738..23c8b1359 100644
--- a/src/common/fs/path_util.h
+++ b/src/common/fs/path_util.h
@@ -289,7 +289,11 @@ enum class DirectorySeparator {
// Splits the path on '/' or '\' and put the components into a vector
// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" }
-[[nodiscard]] std::vector<std::string> SplitPathComponents(std::string_view filename);
+[[nodiscard]] std::vector<std::string_view> SplitPathComponents(std::string_view filename);
+
+// Splits the path on '/' or '\' and put the components into a vector
+// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" }
+[[nodiscard]] std::vector<std::string> SplitPathComponentsCopy(std::string_view filename);
// Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\'
// depending if directory_separator is BackwardSlash or PlatformDefault and running on windows