diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-06-02 07:54:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 07:54:31 +0200 |
commit | 5a3ac86c3f8c1e73ac4eb6ca3495fb919be897c3 (patch) | |
tree | be4089a22189f53d653712d019a2e6b7b77f7b58 | |
parent | 3d78ff9f686538f7d21b85027e7299ad80c21cdc (diff) |
cmd/syncthing: Use correct binary when restarting monitor (#8919)
-rw-r--r-- | cmd/syncthing/monitor.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index edd74ee939..3863bcefde 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -346,7 +346,7 @@ func restartMonitor(binary string, args []string) error { } func restartMonitorUnix(binary string, args []string) error { - return syscall.Exec(args[0], args, os.Environ()) + return syscall.Exec(binary, args, os.Environ()) } func restartMonitorWindows(binary string, args []string) error { @@ -521,7 +521,7 @@ func (f *autoclosedFile) ensureOpenLocked() error { // We open the file for write only, and create it if it doesn't exist. flags := os.O_WRONLY | os.O_CREATE | os.O_APPEND - fd, err := os.OpenFile(f.name, flags, 0644) + fd, err := os.OpenFile(f.name, flags, 0o644) if err != nil { return err } |