| 357 | } |
| 358 | |
| 359 | static bool try_to_create_dir(const wchar_t *path, bool silent, HWND npp_window) { |
| 360 | if (!CreateDirectory(path, nullptr)) { |
| 361 | if (!silent) { |
| 362 | if (npp_window == nullptr) |
| 363 | return false; |
| 364 | |
| 365 | auto msg = wstring_printf(rc_str(IDS_CANT_CREATE_DIR_PS).c_str(), path); |
| 366 | MessageBox(npp_window, msg.c_str(), rc_str(IDS_ERROR_IN_DIR_CREATE).c_str(), MB_OK | MB_ICONERROR); |
| 367 | } |
| 368 | return false; |
| 369 | } |
| 370 | return true; |
| 371 | } |
| 372 | |
| 373 | bool check_for_directory_existence(std::wstring path, bool silent, HWND npp_window) { |
| 374 | for (auto &c : path) { |
no test coverage detected