fixes
This commit is contained in:
		| @@ -159,20 +159,20 @@ auto app_config::default_data_directory(const provider_type &prov) | ||||
|                            }); | ||||
| #else | ||||
| #if defined(__APPLE__) | ||||
|   auto data_directory = utils::path::resolve( | ||||
|   auto data_directory = | ||||
|       utils::path::combine("~", { | ||||
|                                     "Library", | ||||
|                                     "Application Support", | ||||
|                                     REPERTORY_DATA_NAME, | ||||
|                                     app_config::get_provider_name(prov), | ||||
|                                 })); | ||||
|                                 }); | ||||
| #else | ||||
|   auto data_directory = utils::path::resolve( | ||||
|   auto data_directory = | ||||
|       utils::path::combine("~", { | ||||
|                                     ".local", | ||||
|                                     REPERTORY_DATA_NAME, | ||||
|                                     app_config::get_provider_name(prov), | ||||
|                                 })); | ||||
|                                 }); | ||||
| #endif | ||||
| #endif | ||||
|   return data_directory; | ||||
| @@ -327,18 +327,25 @@ auto app_config::get_max_cache_size_bytes() const -> std::uint64_t { | ||||
| auto app_config::get_provider_api_password(const provider_type &prov) | ||||
|     -> std::string { | ||||
| #if defined(_WIN32) | ||||
|   auto api_file = | ||||
|       utils::path::combine(utils::get_local_app_data_directory(), | ||||
|                            {get_provider_display_name(prov), "apipassword"}); | ||||
|   auto api_file = utils::path::combine(utils::get_local_app_data_directory(), | ||||
|                                        { | ||||
|                                            get_provider_display_name(prov), | ||||
|                                            "apipassword", | ||||
|                                        }); | ||||
| #else | ||||
| #if defined(__APPLE__) | ||||
|   auto api_file = | ||||
|       utils::path::combine(utils::path::resolve("~"), | ||||
|                            {"/Library/Application Support", | ||||
|                             get_provider_display_name(prov), "apipassword"}); | ||||
|   auto api_file = utils::path::combine("~", { | ||||
|                                                 "/", | ||||
|                                                 "Library", | ||||
|                                                 "Application Support", | ||||
|                                                 get_provider_display_name(prov), | ||||
|                                                 "apipassword", | ||||
|                                             }); | ||||
| #else | ||||
|   auto api_file = utils::path::combine( | ||||
|       utils::path::resolve("~/."), {get_provider_name(prov), "apipassword"}); | ||||
|   auto api_file = utils::path::combine("~/.", { | ||||
|                                                   get_provider_name(prov), | ||||
|                                                   "apipassword", | ||||
|                                               }); | ||||
| #endif | ||||
| #endif | ||||
|   auto lines = utils::file::read_file_lines(api_file); | ||||
|   | ||||
| @@ -93,11 +93,11 @@ auto lock_data::get_mount_state(json &mount_state) -> bool { | ||||
|  | ||||
| auto lock_data::get_state_directory() -> std::string { | ||||
| #if defined(__APPLE__) | ||||
|   return utils::path::resolve("~/Library/Application Support/" + | ||||
|                               std::string{REPERTORY_DATA_NAME} + "/state"); | ||||
|   return utils::path::absolute("~/Library/Application Support/" + | ||||
|                                std::string{REPERTORY_DATA_NAME} + "/state"); | ||||
| #else | ||||
|   return utils::path::resolve("~/.local/" + std::string{REPERTORY_DATA_NAME} + | ||||
|                               "/state"); | ||||
|   return utils::path::absolute("~/.local/" + std::string{REPERTORY_DATA_NAME} + | ||||
|                                "/state"); | ||||
| #endif | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user