[yabridgectl] Fix VST3 installation status display

This commit is contained in:
Robbert van der Helm
2020-12-24 13:04:30 +01:00
parent d79ccc75e6
commit 9ac437f02b
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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
+1 -1
View File
@@ -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)),