Browse Source

provide a default file name for downloads

deepak1556 8 years ago
parent
commit
94faaf7d58

+ 1 - 1
atom/browser/api/atom_api_download_item.cc

@@ -135,7 +135,7 @@ std::string DownloadItem::GetFilename() const {
                            std::string(),
                            download_item_->GetSuggestedFilename(),
                            GetMimeType(),
-                           std::string()).LossyDisplayName());
+                           "download").LossyDisplayName());
 }
 
 std::string DownloadItem::GetContentDisposition() const {

+ 1 - 1
atom/browser/atom_download_manager_delegate.cc

@@ -60,7 +60,7 @@ void AtomDownloadManagerDelegate::CreateDownloadPath(
                                               std::string(),
                                               suggested_filename,
                                               mime_type,
-                                              std::string());
+                                              "download");
 
   if (!base::PathExists(default_download_path))
     base::CreateDirectory(default_download_path);