MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / try_to_create_dir

Function try_to_create_dir

src/common/Utility.cpp:359–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359static 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
373bool check_for_directory_existence(std::wstring path, bool silent, HWND npp_window) {
374 for (auto &c : path) {

Callers 1

Calls 3

wstring_printfFunction · 0.85
rc_strFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected