stc icon indicating copy to clipboard operation
stc copied to clipboard

use default syncthing config path as default homedir

Open bcicen opened this issue 2 years ago • 2 comments

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

bcicen avatar Feb 27 '23 13:02 bcicen

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 avatar Mar 01 '23 07:03 tenox7

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

tenox7 avatar Mar 01 '23 07:03 tenox7