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

use default syncthing config path as default homedir #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bcicen
Copy link

@bcicen bcicen commented Feb 27, 2023

updates default homedir config value to use the user config dir, e.g. /home/user/.config/syncthing

@tenox7
Copy link
Owner

tenox7 commented Mar 1, 2023

Thanks for the PR! I see what you are doing there, however this will break things at least for me personally. On my Syncthing deployments I have the config and the binary in the same directory. Could you add a fall-through, if a config is not found in os.UserConfigDir() then try filepath.Dir(os.Args[0])? Perhaps just check it with os.Stat() first before passing to os.ReadFile()? Thank you!

@tenox7
Copy link
Owner

tenox7 commented Mar 1, 2023

Also could you please update README with where the config is being looked for. Thank you!

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.

None yet

2 participants