From 53ae2f9dff31edae8dab56b4186b7c6101aa6794 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 7 Nov 2022 20:55:02 +0100 Subject: [PATCH] [yabridgectl] Track created moduleinfo.json files Otherwise they're considered orphans immediately after creating them. --- CHANGELOG.md | 8 ++++++++ tools/yabridgectl/src/actions.rs | 19 ++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ed04f1..c24f1285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] + +# yabridgectl + +- Fixed converted VST 3.7.5 `moduleinfo.json` files being considered orphan + files immediately after yabridgectl created them as part of the sync + operation. + ## [5.0.0] - 2022-11-02 # Added diff --git a/tools/yabridgectl/src/actions.rs b/tools/yabridgectl/src/actions.rs index 67d57282..03617c4d 100644 --- a/tools/yabridgectl/src/actions.rs +++ b/tools/yabridgectl/src/actions.rs @@ -560,14 +560,19 @@ pub fn do_sync(config: &mut Config, options: &SyncOptions) -> Result<()> { let converted_json = serde_jsonrc::to_string_pretty(&converted_module_info) .context("Could not format JSON file")?; - util::write(target_moduleinfo_path, converted_json) + util::write(&target_moduleinfo_path, converted_json) }); - if let Err(error) = result { - eprintln!( - "Error converting '{}', skipping...\n{}", - original_moduleinfo_path.display(), - error - ); + match result { + Ok(_) => { + managed_vst3_bundle_files.insert(target_moduleinfo_path); + } + Err(error) => { + eprintln!( + "Error converting '{}', skipping...\n{}", + original_moduleinfo_path.display(), + error + ); + } } }