summaryrefslogtreecommitdiffstats
path: root/base/nix
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 22:17:42 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 22:17:42 +0000
commit90b3ee177b6f4dabf5f10ca10be123da2222ea9d (patch)
tree40822472a3733681781f4fa98a8abb0a23ab2466 /base/nix
parentbc956dc7febd233bede5634f500d537c52a30a43 (diff)
downloadchromium_src-90b3ee177b6f4dabf5f10ca10be123da2222ea9d.zip
chromium_src-90b3ee177b6f4dabf5f10ca10be123da2222ea9d.tar.gz
chromium_src-90b3ee177b6f4dabf5f10ca10be123da2222ea9d.tar.bz2
Strip trailing path separators from XDG util results.
TEST=NONE BUG=NONE Review URL: https://chromiumcodereview.appspot.com/10496007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/nix')
-rw-r--r--base/nix/xdg_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/nix/xdg_util.cc b/base/nix/xdg_util.cc
index f824618..c59578d 100644
--- a/base/nix/xdg_util.cc
+++ b/base/nix/xdg_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,9 +24,9 @@ FilePath GetXDGUserDirectory(Environment* env, const char* dir_name,
const char* fallback_dir) {
char* xdg_dir = xdg_user_dir_lookup(dir_name);
if (xdg_dir) {
- FilePath rv(xdg_dir);
+ FilePath path(xdg_dir);
free(xdg_dir);
- return rv;
+ return path.StripTrailingSeparators();
}
return file_util::GetHomeDir().Append(fallback_dir);
}