diff --git a/include/data.hpp b/include/data.hpp index 070e5eb..dae073a 100644 --- a/include/data.hpp +++ b/include/data.hpp @@ -9,7 +9,7 @@ class with_data_directory { public: with_data_directory(); - static const fs::path &get_data_path(); + static const fs::path &get_path(); }; class data_validator { diff --git a/src/data.cpp b/src/data.cpp index e34d723..1724e9f 100644 --- a/src/data.cpp +++ b/src/data.cpp @@ -2,7 +2,7 @@ #include #include -const fs::path &with_data_directory::get_data_path() { +const fs::path &with_data_directory::get_path() { static fs::path p(""); if (p.native().length() != 0) { return p; @@ -17,14 +17,14 @@ const fs::path &with_data_directory::get_data_path() { } with_data_directory::with_data_directory() { - if (!fs::exists(get_data_path())) { + if (!fs::exists(get_path())) { create_data_directory(); } } void with_data_directory::create_data_directory() { std::error_code ec; - fs::create_directories(get_data_path(), ec); + fs::create_directories(get_path(), ec); if (ec) { std::cerr << "Unable to create data directory:\n" << ec.message(); }