| 99 | } |
| 100 | |
| 101 | std::optional<std::wstring> Config::LoadDirPath(const std::wstring& dir_type) { |
| 102 | std::wstring path = CanonicalizePath(GetAppDir() + L"\\..\\" + dir_type); |
| 103 | std::wstring dir_key = dir_type + L"_dir"; |
| 104 | std::wstring dir_buffer = GetIniString(L"general", dir_key, path); |
| 105 | |
| 106 | if (dir_buffer == L"none") { |
| 107 | return std::nullopt; |
| 108 | } |
| 109 | |
| 110 | if (dir_buffer.empty()) { |
| 111 | dir_buffer = path; |
| 112 | } |
| 113 | |
| 114 | std::wstring expanded_path = ExpandEnvironmentPath(dir_buffer); |
| 115 | ReplaceStringInPlace(expanded_path, L"%app%", GetAppDir()); |
| 116 | return GetAbsolutePath(expanded_path); |
| 117 | } |
| 118 | |
| 119 | int Config::LoadOpenUrlNewTabMode() { |
| 120 | return ::GetPrivateProfileIntW(L"tabs", L"open_url_new_tab", 0, |
nothing calls this directly
no test coverage detected