This commit is contained in:
2024-08-03 16:09:14 -05:00
parent becd137cf5
commit 97082fa42c
2 changed files with 1 additions and 18 deletions

View File

@ -89,23 +89,6 @@ auto from_api_error(const api_error &e) -> NTSTATUS {
auto get_last_error_code() -> DWORD { return ::GetLastError(); }
auto get_local_app_data_directory() -> const std::string & {
static std::string app_data = ([]() -> std::string {
com_init_wrapper cw;
PWSTR local_app_data{};
if (SUCCEEDED(::SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr,
&local_app_data))) {
auto ret = utils::string::to_utf8(local_app_data);
::CoTaskMemFree(local_app_data);
return ret;
}
throw startup_exception("unable to detect local application data folder");
})();
return app_data;
}
auto get_accessed_time_from_meta(const api_meta_map &meta) -> std::uint64_t {
return utils::string::to_uint64(meta.at(META_ACCESSED));
}