mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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
|
and this project adheres to [Semantic
|
||||||
Versioning](https://semver.org/spec/v2.0.0.html).
|
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
|
## [4.0.1] - 2022-06-12
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -599,18 +599,21 @@ impl SearchIndex {
|
|||||||
// The subdirectory should be relative to the bundle, not to the .vst3
|
// 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
|
// file inside of the bundle. The latter is what we get from the index
|
||||||
// function since it only considers regular files and symlinks.
|
// function since it only considers regular files and symlinks.
|
||||||
subdirectory.map(|subdirectory| {
|
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
|
subdirectory
|
||||||
// x86_64-win
|
// x86_64-win
|
||||||
.parent()
|
.parent()?
|
||||||
.unwrap()
|
|
||||||
// Contents
|
// Contents
|
||||||
.parent()
|
.parent()?
|
||||||
.unwrap()
|
|
||||||
// foo.vst3
|
// foo.vst3
|
||||||
.parent()
|
.parent()?
|
||||||
.unwrap()
|
.to_owned(),
|
||||||
.to_owned()
|
)
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user