Index: base/file_util_posix.cc |
=================================================================== |
--- base/file_util_posix.cc (revision 28937) |
+++ base/file_util_posix.cc (working copy) |
@@ -61,9 +61,9 @@ |
std::wstring GetDirectoryFromPath(const std::wstring& path) { |
if (EndsWithSeparator(path)) { |
- std::wstring dir = path; |
- TrimTrailingSeparator(&dir); |
- return dir; |
+ return FilePath::FromWStringHack(path) |
+ .StripTrailingSeparators() |
+ .ToWStringHack(); |
} else { |
char full_path[PATH_MAX]; |
base::strlcpy(full_path, WideToUTF8(path).c_str(), arraysize(full_path)); |