Skip to content

Commit 7a741ce

Browse files
committed
preprocessor: Import dir/pattern.hexpat if dir is imported
1 parent 1202394 commit 7a741ce

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/source/pl/core/resolvers.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ namespace pl::core::resolvers {
1717
bool exists = false;
1818
// if the path has no extension
1919
if (!fullPath.has_extension()) {
20+
// If the path points to a directory, check for a file called "pattern" inside of it
21+
if (std::fs::is_directory(fullPath)) {
22+
fullPath /= "pattern";
23+
}
24+
2025
for (const auto &ext : { "hexpat", "pat" }) {
2126
fullPath.replace_extension(ext);
2227
exists = std::fs::exists(fullPath);

0 commit comments

Comments
 (0)