From eee3d218c12b0d21f93dec3f9e2fbc899887571c Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 9 Apr 2022 23:24:29 +0200 Subject: [PATCH] [yabridgectl] Handle non-lowercase file extensions Hopefully this shouldn't be needed, but I didn't realize we only parsed lower case file names. Wouldn't be surprised if some installer ends up creating an uppercased `.DLL` file. --- CHANGELOG.md | 5 +++++ tools/yabridgectl/src/files.rs | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43bdf3e3..f85ac0de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). - Fixed an obscure issue with VST3 plugins crashing in **Ardour** on Arch/Manjaro because of misreported parameter queue lengths. +### yabridgectl + +- Handle plugins with mixed or uppercase `.dll` or `.vst3` extensions. Hopefully + this is not needed though! + ## [3.8.1] - 2022-03-08 ### Changed diff --git a/tools/yabridgectl/src/files.rs b/tools/yabridgectl/src/files.rs index 92f185d7..e56713b9 100644 --- a/tools/yabridgectl/src/files.rs +++ b/tools/yabridgectl/src/files.rs @@ -371,17 +371,18 @@ pub fn index(directory: &Path, blacklist: &HashSet<&Path>) -> SearchIndex { ) } - match entry.path().extension().and_then(|os| os.to_str()) { - Some("dll") => dll_files.push(entry.into_path()), - Some("vst3") => vst3_files.push(entry.into_path()), - Some("so") => { + if let Some(ext) = entry.path().extension().and_then(|os| os.to_str()) { + if ext.eq_ignore_ascii_case("dll") { + dll_files.push(entry.into_path()) + } else if ext.eq_ignore_ascii_case("vst3") { + vst3_files.push(entry.into_path()) + } else if ext.eq_ignore_ascii_case("so") { if entry.path_is_symlink() { so_files.push(NativeFile::Symlink(entry.into_path())); } else { so_files.push(NativeFile::Regular(entry.into_path())); } } - _ => (), } }