From 3e6ba79d05b9fce9d60d16d03ddef242379184ae Mon Sep 17 00:00:00 2001 From: Tom Simons Date: Thu, 17 Oct 2024 16:35:07 +0200 Subject: [PATCH] made extensions case invariant --- .../Layers/Adapters/DataTypeAdapters/FileTypeAdapter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Layers/Adapters/DataTypeAdapters/FileTypeAdapter.cs b/Assets/Scripts/Layers/Adapters/DataTypeAdapters/FileTypeAdapter.cs index b481495b..e6b0cbb1 100644 --- a/Assets/Scripts/Layers/Adapters/DataTypeAdapters/FileTypeAdapter.cs +++ b/Assets/Scripts/Layers/Adapters/DataTypeAdapters/FileTypeAdapter.cs @@ -46,7 +46,7 @@ public void ProcessFile(string file) } var fileName = Path.GetFileNameWithoutExtension(file); - var extension = Path.GetExtension(file); + var extension = Path.GetExtension(file).ToLower(); var newFilePathRelative = Path.Combine(assetsFolderName, fileName + extension); var newFilePathAbsolute = Path.Combine(assetsFolderPath, fileName + extension); @@ -65,7 +65,7 @@ public void ProcessFile(string file) if (extension.StartsWith('.')) extension = extension.Substring(1); - var fileTypeEvent = fileTypeEvents.FirstOrDefault(fte => fte.Extension == extension); + var fileTypeEvent = fileTypeEvents.FirstOrDefault(fte => fte.Extension.ToLower() == extension); Debug.Log("processing file: " + newFilePathRelative);