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

brewkenPersistentSettings.conf? #694

Closed
mikfire opened this issue Dec 29, 2022 · 5 comments
Closed

brewkenPersistentSettings.conf? #694

mikfire opened this issue Dec 29, 2022 · 5 comments

Comments

@mikfire
Copy link
Contributor

mikfire commented Dec 29, 2022

I think a merge may have missed something.

ls -ltr ~/.config/brewtarget
total 356
drwxr-xr-x 2 me me        2 Apr 22  2021 obsolete/
-rw-r--r-- 1 me me        0 Apr 22  2021 brewtarget_log.txt
-rw-r--r-- 1 me me     4584 Mar 31  2022 brewtarget-debug.conf
-rw-r--r-- 1 me me   4584 Sep 23 15:20 brewtarget.conf
-rw-r----- 1 me me   714752 Dec 29 10:24 database.sqlite
-rw-r--r-- 1 me me 146680 Dec 29 10:26 brewtarget.log
-rw-r--r-- 1 me me   4088 Dec 29 10:26 brewkenPersistentSettings.conf
@matty0ung
Copy link
Contributor

Took me a minute to twig this one. (Just finished a brew day, so not 100% on the ball!) It's a one-line fix. I'll include it in the Hop fix.

@mikfire
Copy link
Contributor Author

mikfire commented Dec 31, 2022

Is there any plan for converting the current "brewtarget.conf" over to "brewtargetPersistentSettings.conf"?

As it works now, it just created a new configuration file and ignored all my previous settings for the database type, what formula I want to use to calculate IBU, which fields I want displayed in US customary and which in SI (yes, welcome to the USA; I prefer SI but my homebrew supply store only uses US), etc.

I would prefer if we did something like this:
1. Test to see if brewtargetPersistentSettings.conf exists;
2. If it does, open it and we are all happy;
3. If it doesn't, test to see if brewtarget.conf exists;
4. If it does, open it and then save it as brewtargetPersistentSettings.conf;
5. If it doesn't, then create a default brewtargetPersistentSettings.conf
Please notice the intentional lack of any statement about deleting the brewtarget.conf file. I do not like deleting user's files, as it always ends in heart ache.

Failing that, you at least need to pop a dialog and warn the user what you are doing and suggest how they can get their old settings back. Again, this would probably need to at least test for the existence of both files and you have done 40% of the better solution.

@matty0ung
Copy link
Contributor

Ah, hum, yes, you are entirely right!

@matty0ung
Copy link
Contributor

I think your #1 - #5 would actually be relatively small work. (Famous last words, I know.) I'll have a look next year. (Sorry, obligatory new year's eve joke there.)

@matty0ung
Copy link
Contributor

This should be fixed in the 3.0.6 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants