summaryrefslogtreecommitdiffstats
path: root/base/file_path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_path.cc')
-rw-r--r--base/file_path.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/file_path.cc b/base/file_path.cc
index d1a6371..0706a08 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -1124,3 +1124,12 @@ bool FilePath::ReferencesParent() const {
return false;
}
+#if defined(FILE_PATH_USES_WIN_SEPARATORS)
+FilePath FilePath::NormalizeWindowsPathSeparators() const {
+ StringType copy = path_;
+ for (size_t i = 1; i < arraysize(kSeparators); ++i) {
+ std::replace(copy.begin(), copy.end(), kSeparators[i], kSeparators[0]);
+ }
+ return FilePath(copy);
+}
+#endif