Make the VST3 bundle detection more specific

In yabridge itself.
This commit is contained in:
Robbert van der Helm
2022-06-13 00:06:56 +02:00
parent a282bdc9d1
commit 5e95c3b4e0
2 changed files with 17 additions and 2 deletions
+8
View File
@@ -8,6 +8,14 @@ Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fixed a rare edge case where a Windows VST3 plugin would incorrectly be
classified as a bundle, causing loading the plugin to fail. This could happen
if the directory `foo` contained some random directory, containing another
directory, containing `foo.vst3`. Yabridge always assumed this to be a bundle,
even if it is not.
### yabridge
- Don't panic when someone `yabridgectl add`'ed part of the contents of a
+9 -2
View File
@@ -239,9 +239,16 @@ fs::path normalize_plugin_path(const fs::path& windows_library_path,
// an old standalone module
const fs::path win_module_name =
windows_library_path.filename().replace_extension(".vst3");
// NOTE: This extra check is needed to prevent
// `<plugin_dir>/foo/X/Y/foo.vst3` from being recognized as a
// bundle when it isn't in fact a bundle.
const fs::path windows_bundle_contents =
windows_library_path.parent_path().parent_path();
const fs::path windows_bundle_home =
windows_library_path.parent_path().parent_path().parent_path();
if (equals_case_insensitive(windows_bundle_home.filename().string(),
windows_bundle_contents.parent_path();
if (equals_case_insensitive(windows_bundle_contents.string(),
"Contents") &&
equals_case_insensitive(windows_bundle_home.filename().string(),
win_module_name.string())) {
return windows_bundle_home;
} else {