| 352 | } |
| 353 | |
| 354 | bool DownloadDictionariesDialog::download_github_file(const std::wstring &title, const std::wstring &path, std::shared_ptr<ProgressData> progress_data) { |
| 355 | auto local_path = std::wstring(m_settings.get_dictionary_download_path()); |
| 356 | auto local_name = local_path + L"\\" + path.substr(path.rfind(L'/')); |
| 357 | if (PathFileExists(local_name.c_str())) { |
| 358 | if (ask_replacement_message(title.c_str()) == IDNO) { |
| 359 | --m_supposed_downloaded_count; |
| 360 | return false; |
| 361 | } |
| 362 | m_speller_container.get_hunspell_speller().dictionary_removed(local_name); |
| 363 | } |
| 364 | |
| 365 | m_github_provider->download_dictionary(path, local_path, progress_data); |
| 366 | return true; |
| 367 | } |
| 368 | |
| 369 | bool DownloadDictionariesDialog::download_file() { |
| 370 | const auto ftp_path = *current_address() + m_cur->path; |
nothing calls this directly
no test coverage detected