From 3cebf7049265693f09bbd401ab20d3ff022ffc2c Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Tue, 31 Mar 2009 20:13:21 +0000 Subject: Don't create an empty folder when saving complete html pages with no extra resources to save. patch by Paul Robinson Review URL: http://codereview.chromium.org/56089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12897 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/save_package.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chrome/browser/download/save_package.cc') 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 -- cgit v1.1