Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(color): personal templates saved to wrong folder #4886

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Apr 16, 2024

Change personal template folder name to match SD card layout.

Fixes #4885

@raphaelcoeffic raphaelcoeffic added this to the 2.10 milestone Apr 21, 2024
@pfeerick pfeerick added the bug/regression ↩️ A new version of EdgeTX broke something label Apr 21, 2024
@pfeerick
Copy link
Member

pfeerick commented Apr 21, 2024

I see three options here:

  • revert the change in the SD card pack
  • merge this, and tell users rename the folders so they don't have two folders.
  • silently rename on the handset if the old folder(s) are present...

I prefer the first out of simplicity, but think the third is better for end users as they don't need to do anything. Wizard and SoarETX (not SoarETXv2 as that is new) folders would also need renaming in that case if the old folder names present.

@pfeerick pfeerick changed the title fix(color): personal templates saved to wrong folder. fix(color): personal templates saved to wrong folder Apr 21, 2024
@philmoz
Copy link
Collaborator Author

philmoz commented Apr 21, 2024

It looks like the TEMPLATE folders were renamed Sep 2023 so reverting these would affect anyone who has updated their SD card contents.

It should be possible to add a startup check to rename folders (if the new ones are not present).
If both TEMPLATES/PERSONAL and TEMPLATES/2.Personal exist then we can move any files to the new folder.

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 23, 2024

I've take a slightly different approach to the folder renaming concern.

If the new folder exists (2.Personal) the template is saved there.
If the new folder does not exist; but the old one does (PERSONAL), then the template is saved there.
If neither folder exists then the new folder is created and the template saved to it.

This way it works regardless of whether the user has updated their SD card contents or not.
It also avoid trying to guess what to do when both folders exist (i.e. it's up to the user to clean up).

@pfeerick
Copy link
Member

And state would naturally be if both exist, it will use the new 2.Personal in preference to the old PERSONAL.

Sounds good to me... If there are two sets of folders I'm sure the user will do something about it then ;)

@pfeerick pfeerick merged commit 7791216 into EdgeTX:main Apr 24, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression ↩️ A new version of EdgeTX broke something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Radiomaster TX16S Saves New Template In Wrong Directory
3 participants