From d28517897013f1fe3dd1fd01c18592bcd229c1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crocquesel?= Date: Fri, 14 Feb 2025 18:05:24 +0100 Subject: [PATCH] Support Function in nested directories --- .../Corvus/Testing/AzureFunctions/FunctionProject.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Solutions/Corvus.Testing.AzureFunctions/Corvus/Testing/AzureFunctions/FunctionProject.cs b/Solutions/Corvus.Testing.AzureFunctions/Corvus/Testing/AzureFunctions/FunctionProject.cs index a70fd2e..36590f5 100644 --- a/Solutions/Corvus.Testing.AzureFunctions/Corvus/Testing/AzureFunctions/FunctionProject.cs +++ b/Solutions/Corvus.Testing.AzureFunctions/Corvus/Testing/AzureFunctions/FunctionProject.cs @@ -66,9 +66,10 @@ public static string ResolvePath(string pathFragment, string runtime, ILogger? l return Directory.EnumerateDirectories(parent).FirstOrDefault(fullFolderPath => Path.GetFileName(fullFolderPath).Equals(child, StringComparison.InvariantCultureIgnoreCase)); } - string? projectFolder = GetChildFolderCaseInsensitive(candidate.FullName, pathFragment); + // assume pathFragment is in the correct case + string? projectFolder = Path.Combine(candidate.FullName, pathFragment); - if (projectFolder is not null) + if (Directory.Exists(projectFolder)) { string? binFolder = GetChildFolderCaseInsensitive(projectFolder, "bin"); if (binFolder is not null)