From 97082fa42cfc9ea521b3bb1e048a09d9c00f3492 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 3 Aug 2024 16:09:14 -0500 Subject: [PATCH] fixes --- .../src/utils/windows/windows_utils.cpp | 17 ----------------- repertory/repertory/include/cli/mount.hpp | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/repertory/librepertory/src/utils/windows/windows_utils.cpp b/repertory/librepertory/src/utils/windows/windows_utils.cpp index 38b69216..be1a09dc 100644 --- a/repertory/librepertory/src/utils/windows/windows_utils.cpp +++ b/repertory/librepertory/src/utils/windows/windows_utils.cpp @@ -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)); } diff --git a/repertory/repertory/include/cli/mount.hpp b/repertory/repertory/include/cli/mount.hpp index aa177bda..220bdc12 100644 --- a/repertory/repertory/include/cli/mount.hpp +++ b/repertory/repertory/include/cli/mount.hpp @@ -95,7 +95,7 @@ mount(std::vector args, std::string data_directory, #if defined(_WIN32) if (config.get_enable_mount_manager() && not utils::is_process_elevated()) { - com_init_wrapper cw; + utils::com_init_wrapper cw; if (not lock.set_mount_state(true, "elevating", -1)) { std::cerr << "failed to set mount state" << std::endl; }