From e0246be3d42e31608c9a65b66f3164139b2912d6 Mon Sep 17 00:00:00 2001 From: abaskk-msft Date: Mon, 8 Jul 2024 12:36:03 -0700 Subject: [PATCH] Yaml Validator Bug: same file names in different folder cause error (#692) --- src/YamlValidator/YamlLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YamlValidator/YamlLoader.cs b/src/YamlValidator/YamlLoader.cs index 48bf81d2..8e8d94e3 100644 --- a/src/YamlValidator/YamlLoader.cs +++ b/src/YamlValidator/YamlLoader.cs @@ -25,7 +25,7 @@ public IReadOnlyDictionary Load(string filePath, string pathType var yamlFiles = Directory.EnumerateFiles(filePath, "*" + Constants.YamlFileExtension, SearchOption.AllDirectories); foreach (var filename in yamlFiles) { - var fileName = Path.GetFileName(filename); + var fileName = Path.GetFullPath(filename); var yamlText = Utility.ReadFileData(filename); deserializedYaml.Add(fileName, yamlText); }