summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 20:13:21 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 20:13:21 +0000
commit3cebf7049265693f09bbd401ab20d3ff022ffc2c (patch)
tree5ed82b25617cd679b79d5a98bb65be4f4724c8fb /chrome/browser/download/save_package.cc
parentd5dc0edd377353fcb5bb951bf18452a34711e040 (diff)
downloadchromium_src-3cebf7049265693f09bbd401ab20d3ff022ffc2c.zip
chromium_src-3cebf7049265693f09bbd401ab20d3ff022ffc2c.tar.gz
chromium_src-3cebf7049265693f09bbd401ab20d3ff022ffc2c.tar.bz2
Don't create an empty folder when saving complete html pages with no extra resources to save.
patch by Paul Robinson <http://codereview.chromium.org/57030> Review URL: http://codereview.chromium.org/56089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 343cd78..c5cdf1d 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -548,9 +548,9 @@ void SavePackage::CheckFinish() {
if (in_process_count() || finished_)
return;
- FilePath dir = save_type_ == SAVE_AS_COMPLETE_HTML ?
- saved_main_directory_path_ :
- FilePath();
+ FilePath dir = (save_type_ == SAVE_AS_COMPLETE_HTML &&
+ saved_success_items_.size() > 1) ?
+ saved_main_directory_path_ : FilePath();
// This vector contains the final names of all the successfully saved files
// along with their save ids. It will be passed to SaveFileManager to do the