summaryrefslogtreecommitdiffstats
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-07 05:21:37 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-09 03:18:45 +0200
commit2b6128fe0b8788318a4bbe1fc55ea14aed2981e4 (patch)
tree39a8c25dbea98e2f8b5761f408d62cf1669f89bc /src/common/file_util.cpp
parentloader: Remove unused IdentifyFile overload (diff)
downloadyuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.gz
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.bz2
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.lz
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.xz
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.zst
yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.zip
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r--src/common/file_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 190cac6d9..3ce590062 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -884,12 +884,12 @@ std::string_view RemoveTrailingSlash(std::string_view path) {
return path;
}
-std::string SanitizePath(std::string_view path_, bool with_platform_slashes) {
+std::string SanitizePath(std::string_view path_, DirectorySeparator directory_separator) {
std::string path(path_);
- char type1 = '\\';
- char type2 = '/';
+ char type1 = directory_separator == DirectorySeparator::BackwardSlash ? '/' : '\\';
+ char type2 = directory_separator == DirectorySeparator::BackwardSlash ? '\\' : '/';
- if (with_platform_slashes) {
+ if (directory_separator == DirectorySeparator::PlatformDefault) {
#ifdef _WIN32
type1 = '/';
type2 = '\\';