summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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) {
884 return path; 884 return path;
885} 885}
886 886
887std::string SanitizePath(std::string_view path_, bool with_platform_slashes) { 887std::string SanitizePath(std::string_view path_, DirectorySeparator directory_separator) {
888 std::string path(path_); 888 std::string path(path_);
889 char type1 = '\\'; 889 char type1 = directory_separator == DirectorySeparator::BackwardSlash ? '/' : '\\';
890 char type2 = '/'; 890 char type2 = directory_separator == DirectorySeparator::BackwardSlash ? '\\' : '/';
891 891
892 if (with_platform_slashes) { 892 if (directory_separator == DirectorySeparator::PlatformDefault) {
893#ifdef _WIN32 893#ifdef _WIN32
894 type1 = '/'; 894 type1 = '/';
895 type2 = '\\'; 895 type2 = '\\';