Code Review
/
src
/
xds
/
xds-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix syncthing binary path detection.
[src/xds/xds-server.git]
/
lib
/
xdsconfig
/
fileconfig.go
diff --git
a/lib/xdsconfig/fileconfig.go
b/lib/xdsconfig/fileconfig.go
index
a0724af
..
2651caf
100644
(file)
--- a/
lib/xdsconfig/fileconfig.go
+++ b/
lib/xdsconfig/fileconfig.go
@@
-59,11
+59,12
@@
func readGlobalConfig(c *Config, confFile string) error {
searchIn = append(searchIn, "/etc/xds-server/config.json")
exePath := os.Args[0]
searchIn = append(searchIn, "/etc/xds-server/config.json")
exePath := os.Args[0]
- exeAbsPath, err := filepath.Abs(os.Args[0])
+ ee, _ := os.Executable()
+ exeAbsPath, err := filepath.Abs(ee)
if err == nil {
exePath, err = filepath.EvalSymlinks(exeAbsPath)
if err == nil {
if err == nil {
exePath, err = filepath.EvalSymlinks(exeAbsPath)
if err == nil {
- exePath = filepath.Dir(e
xePath
)
+ exePath = filepath.Dir(e
e
)
} else {
exePath = filepath.Dir(exeAbsPath)
}
} else {
exePath = filepath.Dir(exeAbsPath)
}