Skip to content

Commit

Permalink
config: Resolve link issue with getDataDir
Browse files Browse the repository at this point in the history
  • Loading branch information
sc2ad committed Nov 3, 2023
1 parent 70b8ef1 commit ab8bcf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shared/config/config-utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool parsejson(ConfigDocument& doc, std::string_view js);
/// @brief Returns a path to the persistent data directory for the provided const ModInfo&.
/// @param info The const ModInfo& to find a path for.
/// @return The path to the directory.
std::string getDataDir(const modloader::ModInfo& info);
std::string getDataDir(modloader::ModInfo const& info);

/// @brief Returns a path to the persistent data directory for ID.
/// @param id The id to find a path for.
Expand Down
3 changes: 1 addition & 2 deletions src/config/config-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "scotland2/shared/loader.hpp"
#include "scotland2/shared/modloader.h"


// CONFIG

bool readJson = false;
Expand Down Expand Up @@ -91,7 +90,7 @@ std::string Configuration::getConfigFilePath(const modloader::ModInfo& info) {
}

static std::optional<std::string> dataDir;
std::string getDataDir(const CModInfo& info) {
std::string getDataDir(modloader::ModInfo const& info) {
if (!dataDir) {
dataDir = string_format(PERSISTENT_DIR, modloader_get_application_id());
if (!direxists(*dataDir)) {
Expand Down

0 comments on commit ab8bcf3

Please sign in to comment.