From 6e7eff95e7380f5d9544504d0fcb68ae109c7d72 Mon Sep 17 00:00:00 2001 From: klayoutmatthias Date: Sun, 27 Apr 2025 19:16:37 +0200 Subject: [PATCH] Fixed glob feature for Windows. --- src/tl/tl/tlFileUtils.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tl/tl/tlFileUtils.cc b/src/tl/tl/tlFileUtils.cc index a3b755db0..1735d853f 100644 --- a/src/tl/tl/tlFileUtils.cc +++ b/src/tl/tl/tlFileUtils.cc @@ -458,6 +458,16 @@ static void glob_partial (const std::string &where, std::vector::co ++pfrom; } +#if defined(_WIN32) + if (where.empty ()) { + // On Windows, we cannot iterate the drives + std::string root = *pfrom; + ++pfrom; + glob_partial (root, pfrom, pto, res); + return; + } +#endif + tl::GlobPattern glob (tl::trimmed_part (*pfrom)); ++pfrom; auto entries = dir_entries (where, true, true, true);