diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 05:00:25 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 05:00:25 +0000 |
commit | 2c8088a4452c2c204237ba9f2f3706e7eeaaf35b (patch) | |
tree | cc21ba5595d16b4b441206240af0606fe7fffb18 /base/file_util_posix.cc | |
parent | 1c8a50abea168e3ff3a3346387ab04936c4a3180 (diff) | |
download | chromium_src-2c8088a4452c2c204237ba9f2f3706e7eeaaf35b.zip chromium_src-2c8088a4452c2c204237ba9f2f3706e7eeaaf35b.tar.gz chromium_src-2c8088a4452c2c204237ba9f2f3706e7eeaaf35b.tar.bz2 |
Remove file_util::TrimTrailingSeparators(), which is deprecated and
doesn't work well for Windows root drives.
BUG=24722
TEST=existing tests are enough.
Review URL: http://codereview.chromium.org/271086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_posix.cc')
-rw-r--r-- | base/file_util_posix.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc index f011580..6c5b86a 100644 --- a/base/file_util_posix.cc +++ b/base/file_util_posix.cc @@ -61,9 +61,9 @@ static const char* kTempFileName = "org.chromium.XXXXXX"; 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)); |