mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
[yabridgectl] Gracefully catch bundle subdir error
This could only occur if people go out of their way to do weird things and add the `x86_64-win` directory inside of a VST3 bundle to their plugin locations. But somehow people still manage to do just that.....
This commit is contained in:
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic
|
||||
Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### yabridge
|
||||
|
||||
- Don't panic when someone `yabridgectl add`'ed part of the contents of a
|
||||
Windows VST3 bundle. For the record, you really, really, _really_ shouldn't be
|
||||
doing this.
|
||||
|
||||
## [4.0.1] - 2022-06-12
|
||||
|
||||
### Added
|
||||
|
||||
@@ -599,18 +599,21 @@ impl SearchIndex {
|
||||
// The subdirectory should be relative to the bundle, not to the .vst3
|
||||
// file inside of the bundle. The latter is what we get from the index
|
||||
// function since it only considers regular files and symlinks.
|
||||
subdirectory.map(|subdirectory| {
|
||||
subdirectory
|
||||
// x86_64-win
|
||||
.parent()
|
||||
.unwrap()
|
||||
// Contents
|
||||
.parent()
|
||||
.unwrap()
|
||||
// foo.vst3
|
||||
.parent()
|
||||
.unwrap()
|
||||
.to_owned()
|
||||
subdirectory.and_then(|subdirectory| {
|
||||
// NOTE: Just `.uwnrapping()` all of these and using `.map()`
|
||||
// instead of `.and_then()` should be sufficient, but for some
|
||||
// reason people add the `x86_64-win` directory inside of a
|
||||
// VST3 bundle to their plugin locations........why?
|
||||
Some(
|
||||
subdirectory
|
||||
// x86_64-win
|
||||
.parent()?
|
||||
// Contents
|
||||
.parent()?
|
||||
// foo.vst3
|
||||
.parent()?
|
||||
.to_owned(),
|
||||
)
|
||||
}),
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user