From cf048c98042a85323ab75a7bac8e858f368093d3 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 26 Nov 2025 00:07:00 -0800 Subject: [PATCH] Fix path filter query warning --- Source/Engine/Platform/Base/FileSystemBase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Engine/Platform/Base/FileSystemBase.cpp b/Source/Engine/Platform/Base/FileSystemBase.cpp index 36b4182de..f414bbd01 100644 --- a/Source/Engine/Platform/Base/FileSystemBase.cpp +++ b/Source/Engine/Platform/Base/FileSystemBase.cpp @@ -327,10 +327,10 @@ bool FileSystemBase::PathFilterHelper(const char* path, const char* searchPatter // All files return true; } - else if (searchPattern[0] == '*' && searchPatternLength < pathLength && StringUtils::Compare(path + pathLength - searchPatternLength + 1, searchPattern + 1, searchPatternLength - 1) == 0) + else if (searchPattern[0] == '*' && StringUtils::Find(searchPattern + 1, "*") == nullptr) { // Path ending - return true; + return searchPatternLength < pathLength && StringUtils::Compare(path + pathLength - searchPatternLength + 1, searchPattern + 1, searchPatternLength - 1) == 0; } else if (searchPattern[0] == '*' && searchPatternLength > 2 && searchPattern[searchPatternLength - 1] == '*') { @@ -346,7 +346,7 @@ bool FileSystemBase::PathFilterHelper(const char* path, const char* searchPatter else { // TODO: implement all cases in a generic way - LOG(Warning, "DirectoryGetFiles: Wildcard filter is not implemented"); + LOG(Warning, "DirectoryGetFiles: Wildcard filter is not implemented ({})", String(searchPattern)); } return false; }