diff --git a/src/lib/include/dire/project.hpp b/src/lib/include/dire/project.hpp index 0e65b49..5062d70 100644 --- a/src/lib/include/dire/project.hpp +++ b/src/lib/include/dire/project.hpp @@ -30,7 +30,7 @@ class IReallyWantMyOwnPlatformProjectName /** * This class stores the platform-specific project name, which is used as a subpath for the project directories. * - * It should be obtained via a call to `dire::project::name()`, which returns a name standarized for the build platform. + * It should be obtained via a call to `dire::name()`, which returns a name standarized for the build platform. * * If you **REALLY** want to enforce your own name, initialize it by using `IReallyWantMyOwnPlatformProjectName`. * diff --git a/src/lib/src/dire/windows/project.cpp b/src/lib/src/dire/windows/project.cpp index 268b37e..46e4b63 100644 --- a/src/lib/src/dire/windows/project.cpp +++ b/src/lib/src/dire/windows/project.cpp @@ -48,7 +48,7 @@ auto name(std::string domain, [[maybe_unused]] std::string org, std::string app_ ); return PlatformProjectName( - Path(detail::trim(std::move(domain))) / Path(detail::trim(std::move(app_name))) + Path(detail::trim(std::move(org))) / Path(detail::trim(std::move(app_name))) ); } diff --git a/src/test/windows/project_dirs.cpp b/src/test/windows/project_dirs.cpp index 2b128bd..2791739 100644 --- a/src/test/windows/project_dirs.cpp +++ b/src/test/windows/project_dirs.cpp @@ -8,9 +8,9 @@ TEST_CASE("name() normalizes name for platform", "[project_dirs]") { using dire::Path; - REQUIRE(static_cast(dire::name("baz", "bar", "foo")) == "baz\\foo"); - REQUIRE(static_cast(dire::name(" F o o", "foo", " BaZ ")) == "F o o\\BaZ"); - REQUIRE(static_cast(dire::name("domain", "x", " baz -az ")) == "domain\\baz -az"); + REQUIRE(static_cast(dire::name("baz", "bar", "foo")) == "bar\\foo"); + REQUIRE(static_cast(dire::name("foo", " F o o", " BaZ ")) == "F o o\\BaZ"); + REQUIRE(static_cast(dire::name("domain", "x", " baz -az ")) == "x\\baz -az"); } TEST_CASE("name() respects IReallyWantMyOwnPlatformProjectName", "[project_dirs]") @@ -24,12 +24,12 @@ TEST_CASE("Dir functions respect name", "[project_dirs]") { auto name = dire::name("domain", "org", " a _p - p "); - REQUIRE(dire::config_dir(name)->string().ends_with("domain\\a _p - p\\config")); - REQUIRE(dire::data_dir(name)->string().ends_with("domain\\a _p - p\\data")); - REQUIRE(dire::cache_dir(name)->string().ends_with("domain\\a _p - p\\cache")); - REQUIRE(dire::data_local_dir(name)->string().ends_with("domain\\a _p - p\\data")); - REQUIRE(dire::config_local_dir(name)->string().ends_with("domain\\a _p - p\\config")); - REQUIRE(dire::preference_dir(name)->string().ends_with("domain\\a _p - p\\config")); + REQUIRE(dire::config_dir(name)->string().ends_with("org\\a _p - p\\config")); + REQUIRE(dire::data_dir(name)->string().ends_with("org\\a _p - p\\data")); + REQUIRE(dire::cache_dir(name)->string().ends_with("org\\a _p - p\\cache")); + REQUIRE(dire::data_local_dir(name)->string().ends_with("org\\a _p - p\\data")); + REQUIRE(dire::config_local_dir(name)->string().ends_with("org\\a _p - p\\config")); + REQUIRE(dire::preference_dir(name)->string().ends_with("org\\a _p - p\\config")); REQUIRE(not dire::runtime_dir(name)); REQUIRE(not dire::state_dir(name));