mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Make the VST3 bundle detection more specific
In yabridge itself.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user