diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c996215b4..9cf1eff29 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/syncthing/syncthing", - "GoVersion": "go1.5.1", + "GoVersion": "go1.5.2", "Packages": [ "./cmd/..." ], @@ -31,7 +31,7 @@ }, { "ImportPath": "github.com/kardianos/osext", - "Rev": "345163ffe35aa66560a4cd7dddf00f3ae21c9fda" + "Rev": "431e263e413efe4446ede50cec4819b26659fbe7" }, { "ImportPath": "github.com/rcrowley/go-metrics", diff --git a/Godeps/_workspace/src/github.com/kardianos/osext/osext.go b/Godeps/_workspace/src/github.com/kardianos/osext/osext.go index 7bef46f03..c0de8b7f5 100644 --- a/Godeps/_workspace/src/github.com/kardianos/osext/osext.go +++ b/Godeps/_workspace/src/github.com/kardianos/osext/osext.go @@ -7,12 +7,18 @@ package osext import "path/filepath" +var cx, ce = executableClean() + +func executableClean() (string, error) { + p, err := executable() + return filepath.Clean(p), err +} + // Executable returns an absolute path that can be used to // re-invoke the current program. // It may not be valid after the current program exits. func Executable() (string, error) { - p, err := executable() - return filepath.Clean(p), err + return cx, ce } // Returns same path as Executable, returns just the folder diff --git a/Godeps/_workspace/src/github.com/kardianos/osext/osext_procfs.go b/Godeps/_workspace/src/github.com/kardianos/osext/osext_procfs.go index d59847ee5..8a0dccbb1 100644 --- a/Godeps/_workspace/src/github.com/kardianos/osext/osext_procfs.go +++ b/Godeps/_workspace/src/github.com/kardianos/osext/osext_procfs.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux netbsd solaris dragonfly +// +build linux netbsd solaris dragonfly freebsd package osext @@ -27,6 +27,8 @@ func executable() (string, error) { return execpath, nil case "netbsd": return os.Readlink("/proc/curproc/exe") + case "freebsd": + return os.Readlink("/proc/curproc/file") case "dragonfly": return os.Readlink("/proc/curproc/file") case "solaris":