From 9ac437f02bbf93e734c5ed415f0b20143e235250 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 24 Dec 2020 13:04:30 +0100 Subject: [PATCH] [yabridgectl] Fix VST3 installation status display --- tools/yabridgectl/src/files.rs | 7 ++++--- tools/yabridgectl/src/utils.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/yabridgectl/src/files.rs b/tools/yabridgectl/src/files.rs index 81243034..8e6426d7 100644 --- a/tools/yabridgectl/src/files.rs +++ b/tools/yabridgectl/src/files.rs @@ -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 diff --git a/tools/yabridgectl/src/utils.rs b/tools/yabridgectl/src/utils.rs index b50dfc41..7e70be33 100644 --- a/tools/yabridgectl/src/utils.rs +++ b/tools/yabridgectl/src/utils.rs @@ -87,7 +87,7 @@ pub fn symlink, Q: AsRef>(src: P, dst: Q) -> Result<()> { /// Get the type of a file, if it exists. pub fn get_file_type(path: PathBuf) -> Option { - 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)),