summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index 1bf4d5e..ab0ae58 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -76,6 +76,11 @@ bool EnsureEndsWithSeparator(FilePath* path) {
return true;
}
+void TrimTrailingSeparator(std::wstring* dir) {
+ while (dir->length() > 1 && EndsWithSeparator(dir))
+ dir->resize(dir->length() - 1);
+}
+
FilePath::StringType GetFileExtensionFromPath(const FilePath& path) {
FilePath::StringType file_name = path.BaseName().value();
const FilePath::StringType::size_type last_dot =