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

Custom folder location #32

Closed
FinalSh4re opened this issue Feb 19, 2021 · 8 comments
Closed

Custom folder location #32

FinalSh4re opened this issue Feb 19, 2021 · 8 comments

Comments

@FinalSh4re
Copy link

I would suggest to implement a way to change the directory for the config and log files from the default home directory. Personally I don't like my home directory to be cluttered, thus I changed the folder location in code. However, that's not really a user friendly solution. An alternative would be to maybe simply make the folder hidden?

@dheijl
Copy link
Owner

dheijl commented Feb 19, 2021

I could change the folder name to ".swyh-rs", is that good enough?

I then would also rename any existing "swyh-rs" folder on startup to ".swyh-rs" if swyh-rs exists and ".swyh-rs" does not.

@FinalSh4re
Copy link
Author

Fine for me, as long as it does not cause any problems with regard to cross platform compatibility? I don't use Windows, but wouldn't it need some kind of hidden folder flag or something? As far as I know Windows doesn't treat folders with . prefix as hidden.

@dheijl
Copy link
Owner

dheijl commented Feb 19, 2021

That's right, but I'm afraid many Windows users will never find that folder if it's hidden. Besides, folders like ".rustup" are not hidden on Windows either.

@FinalSh4re
Copy link
Author

Otherwise it might be an option to make the default location relative to the binary file (eg. make a folder in the cwd). This way you can put the program in some folder of choice. For quick access it's always possible to just create a link anyway.

@dheijl
Copy link
Owner

dheijl commented Feb 19, 2021

They can put the executable anywhere they want anyway, but the config file and log file are in a predictable location now and I feel inclined to leave it that way.

@FinalSh4re
Copy link
Author

Having the config folder in the same directory as the executable shouldn't be any less predictable I think. Anyway, I changed the path on my machine manually in code. So, I don't mind either way. If it requires a lot of effort just leave it. It's only cosmetics anyway. Personally I just don't like additional folders in my home directory therefore I made the suggestion.

@dheijl
Copy link
Owner

dheijl commented Feb 19, 2021

I understand and it's not a lot of work but as all Linux apps leave eveything in hidden folders in the home folder I thought it best to do the same.
I originally had plans to make an installer for Windows that puts swyh-rs in the Program Files folder that is read only for the user by default and by design, so that was one reason why I didn't like to put anything with the executable that is not executable. I may make the installer available for the 1.3.6 release.

@FinalSh4re
Copy link
Author

That makes a lot of sense. In fact I also just made the folder hidden but left it in the home directory, like you said it's normal on Linux.

@dheijl dheijl closed this as completed Feb 25, 2021
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