| Index: chrome/common/chrome_paths_linux.cc
|
| ===================================================================
|
| --- chrome/common/chrome_paths_linux.cc (revision 134311)
|
| +++ chrome/common/chrome_paths_linux.cc (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 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.
|
|
|
| @@ -84,25 +84,16 @@
|
| return true;
|
| }
|
|
|
| -// We respect the user's preferred download location, unless it is
|
| -// ~ or their desktop directory, in which case we default to ~/Downloads.
|
| +bool GetUserDownloadsDirectorySafe(FilePath* result) {
|
| + FilePath home = file_util::GetHomeDir();
|
| + *result = home.Append(kDownloadsDir);
|
| + return true;
|
| +}
|
| +
|
| bool GetUserDownloadsDirectory(FilePath* result) {
|
| scoped_ptr<base::Environment> env(base::Environment::Create());
|
| *result = base::nix::GetXDGUserDirectory(env.get(), "DOWNLOAD",
|
| kDownloadsDir);
|
| -
|
| - FilePath home = file_util::GetHomeDir();
|
| - if (*result == home) {
|
| - *result = home.Append(kDownloadsDir);
|
| - return true;
|
| - }
|
| -
|
| - FilePath desktop;
|
| - GetUserDesktop(&desktop);
|
| - if (*result == desktop) {
|
| - *result = home.Append(kDownloadsDir);
|
| - }
|
| -
|
| return true;
|
| }
|
|
|
|
|