diff --git a/CHANGELOG.md b/CHANGELOG.md index bf61baf..da1671a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.2] - 2023-09-05 + +### Fixed + +- Wrong use of the module path + ## [0.1.1] - 2023-09-05 ### Changed diff --git a/pyproject.toml b/pyproject.toml index a02b830..840b421 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "py-toolbox" -version = "0.1.1" +version = "0.1.2" authors = [{ name = "Jean-Sébastien CONAN", email = "jsconan@gmail.com" }] description = "A set of utilities for Python projects" readme = "README.md" diff --git a/toolbox/files/path.py b/toolbox/files/path.py index 3148204..99e7014 100644 --- a/toolbox/files/path.py +++ b/toolbox/files/path.py @@ -32,10 +32,7 @@ def get_module_folder_path(name: str) -> PurePath(): Returns: PurePath: The path to the folder containing the given module. """ - if name in sys.modules: - return PurePath(sys.modules[name].__path__) - - return PurePath() + return get_module_path(name).parent def get_application_path(name: str) -> PurePath: