MobiFlight-Connector icon indicating copy to clipboard operation
MobiFlight-Connector copied to clipboard

Linked configs are not handled correctly when upgrading to beta (.mfproj)

Open tigert opened this issue 8 months ago • 2 comments

Describe the bug When a user has config files linked to a specific aircraft, and upgrades to the beta that converts the loaded .mcc file into .mfproj, the linked filename is not updated accordingly.

Steps To Reproduce Steps to reproduce the behavior:

  1. Install stable MF Connector into a folder, start MSFS.
  2. Create a mcc file and link it to the current aircraft in MSFS.
  3. Upgrade to beta
  4. See your mcc file get converted to .mfproj and your MF Connector ugraded to latest UI.

Expected behavior Link should be updated to point to the converted .mfproj file

Actual behavior Link still points to .mcc and when aircraft changes, the old mcc file is loaded and converted to the mfproj file every time, because the linked filename is not updated.

Image

tigert avatar Apr 03 '25 15:04 tigert

This is a tricky problem.

  • We don't auto-save the mfproj file.
  • If there are no changes, the user won't save the file with the new extension. It will be migrated on the fly next time too.
  • So the file name will stay *.mcc

Option 1: We rename the file in the list of the linked configs as soon as we load the old mcc. Problem: If we persist these settings, but don't save the mfproj-file -> next time MF won't be able to auto-load the config

Option 2: Wait for the user to save the file as mfproj. Then update the link. Problem: How do we know that this was the intention? User might have just saved the file for some testing... but doesn't want to replace the link.

Option 2.1: On loading an mcc file and migrating it. The next time the users saves, a dialog pops up and asks if you want to replace the linked configs. we would have to store the old file prior to renaming, and then track whether the file got saved.

DocMoebiuz avatar May 13 '25 13:05 DocMoebiuz

btw, this is also an "issue" in the current version of MobiFlight, when you "Save as" your config file.

DocMoebiuz avatar May 14 '25 06:05 DocMoebiuz