Fixed handling of absolute paths in glob patterns
This commit is contained in:
@@ -253,12 +253,14 @@ std::vector<std::string> diagram::get_translation_units() const
|
|||||||
LOG_DBG("Looking for translation units in {}", root_directory().string());
|
LOG_DBG("Looking for translation units in {}", root_directory().string());
|
||||||
|
|
||||||
for (const auto &g : glob()) {
|
for (const auto &g : glob()) {
|
||||||
std::string glob_path =
|
std::filesystem::path absolute_glob_path{g};
|
||||||
fmt::format("{}/{}", root_directory().string(), g.c_str());
|
|
||||||
|
|
||||||
LOG_DBG("Searching glob path {}", glob_path);
|
if (!absolute_glob_path.is_absolute())
|
||||||
|
absolute_glob_path = root_directory() / absolute_glob_path;
|
||||||
|
|
||||||
auto matches = glob::glob(glob_path, true, false);
|
LOG_DBG("Searching glob path {}", absolute_glob_path.string());
|
||||||
|
|
||||||
|
auto matches = glob::glob(absolute_glob_path, true, false);
|
||||||
|
|
||||||
for (const auto &match : matches) {
|
for (const auto &match : matches) {
|
||||||
const auto path =
|
const auto path =
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ diagrams:
|
|||||||
t00025_class:
|
t00025_class:
|
||||||
type: class
|
type: class
|
||||||
glob:
|
glob:
|
||||||
- /t00025.cc
|
- t00025.cc
|
||||||
using_namespace: clanguml::t00025
|
using_namespace: clanguml::t00025
|
||||||
include:
|
include:
|
||||||
namespaces:
|
namespaces:
|
||||||
|
|||||||
Reference in New Issue
Block a user