diff --git a/dll/local_storage.cpp b/dll/local_storage.cpp index 08f4465..98bb284 100644 --- a/dll/local_storage.cpp +++ b/dll/local_storage.cpp @@ -53,11 +53,6 @@ std::string Local_Storage::get_global_settings_path() return ""; } -std::string Local_Storage::get_global_inventory_path() -{ - return ""; -} - Local_Storage::Local_Storage(std::string save_directory) { @@ -527,11 +522,6 @@ std::string Local_Storage::get_global_settings_path() return save_directory + settings_storage_folder + PATH_SEPARATOR; } -std::string Local_Storage::get_global_inventory_path() -{ - return save_directory + inventory_storage_folder + PATH_SEPARATOR; -} - std::vector Local_Storage::get_filenames_path(std::string path) { if (path.back() != *PATH_SEPARATOR) { @@ -703,7 +693,7 @@ bool Local_Storage::update_save_filenames(std::string folder) bool Local_Storage::load_inventory_file(nlohmann::json& json, std::string const&file) { - std::string inv_path = std::move(get_global_inventory_path() + appid + file); + std::string inv_path = std::move(save_directory + appid + inventory_storage_folder + PATH_SEPARATOR + file); std::ifstream inventory_file(inv_path); // If there is a file and we opened it if (inventory_file) @@ -735,11 +725,11 @@ bool Local_Storage::load_inventory_file(nlohmann::json& json, std::string const& bool Local_Storage::write_inventory_file(nlohmann::json const& json, std::string const&file) { - std::string inv_path = std::move(get_global_inventory_path() + appid); + std::string inv_path = std::move(save_directory + appid + inventory_storage_folder); create_directory(inv_path); - std::ofstream inventory_file(inv_path + file, std::ios::trunc | std::ios::out); + std::ofstream inventory_file(inv_path + PATH_SEPARATOR + file, std::ios::trunc | std::ios::out); if (inventory_file) { inventory_file << std::setw(2) << json; diff --git a/dll/local_storage.h b/dll/local_storage.h index ef618a5..38d676b 100644 --- a/dll/local_storage.h +++ b/dll/local_storage.h @@ -59,7 +59,6 @@ public: bool file_delete(std::string folder, std::string file); uint64_t file_timestamp(std::string folder, std::string file); std::string get_global_settings_path(); - std::string get_global_inventory_path(); std::string get_path(std::string folder); bool update_save_filenames(std::string folder);