mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
[yabridgectl] Fix VST3 installation status display
This commit is contained in:
@@ -257,9 +257,10 @@ impl SearchResults {
|
||||
// And for VST3 modules. We have not stored the paths to the corresponding `.so` files yet
|
||||
// because they are not in any of the directories we're indexing.
|
||||
installation_status.extend(self.vst3_modules.iter().map(|module| {
|
||||
let module_path = module.target_native_module_path();
|
||||
let install_type = get_file_type(module_path.clone());
|
||||
(module_path, install_type)
|
||||
(
|
||||
module.original_path().to_owned(),
|
||||
get_file_type(module.target_native_module_path()),
|
||||
)
|
||||
}));
|
||||
|
||||
installation_status
|
||||
|
||||
@@ -87,7 +87,7 @@ pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> Result<()> {
|
||||
|
||||
/// Get the type of a file, if it exists.
|
||||
pub fn get_file_type(path: PathBuf) -> Option<NativeFile> {
|
||||
match path.metadata() {
|
||||
match path.symlink_metadata() {
|
||||
Ok(metadata) if metadata.file_type().is_symlink() => Some(NativeFile::Symlink(path)),
|
||||
Ok(metadata) if metadata.file_type().is_dir() => Some(NativeFile::Directory(path)),
|
||||
Ok(_) => Some(NativeFile::Regular(path)),
|
||||
|
||||
Reference in New Issue
Block a user