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

Move configuration to separate directory #3336

Merged

Conversation

Layfully
Copy link
Contributor

@Layfully Layfully commented Feb 21, 2025

  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.

To allow symlinking configuration directory I'd like to move all configuration related files to separate directory. Here I'll try to accomplish that without breaking changes i.e for new installations use the new directory directly, for existing ones move settings to the desired directory and use them from there. I try to follow the existing codebase style and hopefully will be able to contribute this feature to the project. I'll keep it draft until I think it's ready for review, will take me some time as I plan to spend 30 minutes to - 1 hour on it when I have free time.

Closes #3285

@Layfully Layfully force-pushed the configuration-in-separate-directory branch from cc46031 to fbb2b91 Compare February 21, 2025 18:18
@marticliment
Copy link
Owner

The only requirement I would say is that it must be backwards compatible, in the sense that settings must be automatically migrated to the new folder, with the process being transparent to the user

@Layfully Layfully force-pushed the configuration-in-separate-directory branch 3 times, most recently from f7890a4 to 7aadff1 Compare February 23, 2025 09:35
@Layfully Layfully force-pushed the configuration-in-separate-directory branch from 7aadff1 to fa0b13d Compare February 23, 2025 09:36
@Layfully Layfully marked this pull request as ready for review February 23, 2025 10:33
@Layfully Layfully changed the title WIP: Move configuration to separate directory Move configuration to separate directory Feb 23, 2025
@Layfully
Copy link
Contributor Author

Layfully commented Feb 23, 2025

Hey @marticliment, I think it's ready for review. I tested it manually, and at startup, all existing configuration files are successfully moved to the Configuration directory. I also wrote tests to cover both fresh installations and scenarios with existing configurations.

Now that configuration files are stored in a separate directory, we could consider adding a setting to allow users to specify a custom path for the configuration directory. This would give them more flexibility in managing their configuration files.

@marticliment
Copy link
Owner

Now that configuration files are stored in a separate directory, we could consider adding a setting to allow users to specify a custom path for the configuration directory. This would give them more flexibility in managing their configuration files.

This could work in the same way UniGetUI changes settings location when in portable mode

@Layfully
Copy link
Contributor Author

Do you mean I should extend something there? My thoughts were just an idea if someone wanted to have it. Currently I'd be happy with what I've implemented if possible

@marticliment
Copy link
Owner

Currently I'd be happy with what I've implemented if possible

Don't worry then, I will do it eventually. I will test, review and merge soon

@marticliment marticliment merged commit 7e6488a into marticliment:main Feb 26, 2025
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

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Allow symlink for settings
2 participants