MCPcopy Create free account
hub / github.com/Bush2021/chrome_plus / LoadDirPath

Method LoadDirPath

src/config.cc:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101std::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
119int Config::LoadOpenUrlNewTabMode() {
120 return ::GetPrivateProfileIntW(L"tabs", L"open_url_new_tab", 0,

Callers

nothing calls this directly

Calls 5

CanonicalizePathFunction · 0.85
GetIniStringFunction · 0.85
ExpandEnvironmentPathFunction · 0.85
ReplaceStringInPlaceFunction · 0.85
GetAbsolutePathFunction · 0.85

Tested by

no test coverage detected