summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--chrome/browser/download/save_package.cc15
2 files changed, 14 insertions, 4 deletions
diff --git a/AUTHORS b/AUTHORS
index b84213c..8888524 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -29,4 +29,5 @@ Yong Shin <sy3620@gmail.com>
Laszlo Radanyi <bekkra@gmail.com>
Raman Tenneti <raman.tenneti@gmail.com>
Kyle Nahrgang <kpn24@drexel.edu>
-Kim Christensen <kimworking@gmail.com> \ No newline at end of file
+Kim Christensen <kimworking@gmail.com>
+Paul Robinson <paulrobinson85@googlemail.com> \ No newline at end of file
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 12d2443..158432d 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -963,9 +963,18 @@ FilePath SavePackage::GetSuggestNameForSaveAs(PrefService* prefs,
// If not, initialize it with default directory.
if (!prefs->IsPrefRegistered(prefs::kSaveFileDefaultDirectory)) {
FilePath default_save_path;
- if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
- &default_save_path))
- NOTREACHED();
+ if (!prefs->IsPrefRegistered(prefs::kDownloadDefaultDirectory)) {
+ if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
+ &default_save_path)) {
+ NOTREACHED();
+ }
+ } else {
+ StringPrefMember default_download_path;
+ default_download_path.Init(prefs::kDownloadDefaultDirectory,
+ prefs, NULL);
+ default_save_path = FilePath::FromWStringHack(
+ default_download_path.GetValue());
+ }
prefs->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
default_save_path);
}